@@ -17,103 +17,17 @@ jobs:
1717 runs-on : ubuntu-latest
1818 steps :
1919 - name : Init
20- uses : actions/checkout@v3
20+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2121 with :
2222 fetch-depth : 2
2323 - name : Install pnpm
24- uses : pnpm/action-setup@v4.0.0
24+ uses : pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
2525 - name : Setup Node
26- uses : actions/setup-node@v3
26+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
2727 with :
2828 node-version : 18
29- cache : " pnpm"
29+ cache : pnpm
3030 - name : Install dependencies
3131 run : pnpm install
3232 - name : Build
3333 run : pnpm build
34- env :
35- TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
36- TURBO_TEAM : ${{ vars.TURBO_TEAM }}
37- - name : Run tests
38- run : pnpm test
39- env :
40- UPSTASH_REDIS_URL : ${{ secrets.UPSTASH_REDIS_URL }}
41- UPSTASH_REDIS_KEY : ${{ secrets.UPSTASH_REDIS_KEY }}
42- TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
43- TURBO_TEAM : ${{ vars.TURBO_TEAM }}
44- # - name: Coverage
45- # uses: codecov/codecov-action@v1
46- # with:
47- # directory: ./coverage
48- # fail_ci_if_error: false
49- release-branch :
50- name : Publish branch
51- runs-on : ubuntu-latest
52- needs : test
53- if : ${{ github.event_name == 'push' }}
54- environment : Production
55- steps :
56- - name : Init
57- uses : actions/checkout@v3
58- with :
59- fetch-depth : 0
60- - name : Install pnpm
61- uses : pnpm/action-setup@v4.0.0
62- - name : Setup Node
63- uses : actions/setup-node@v3
64- with :
65- node-version : 18
66- cache : " pnpm"
67- - name : Install dependencies
68- run : pnpm install
69- - name : Publish to npm and GitHub
70- run : |
71- git config --global user.email "balazsorban44@users.noreply.github.com"
72- git config --global user.name "Balázs Orbán"
73- pnpm release
74- env :
75- RELEASE_TOKEN : ${{ secrets.RELEASE_TOKEN }}
76- GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
77- NPM_TOKEN_PKG : ${{ secrets.NPM_TOKEN_PKG }}
78- NPM_TOKEN_ORG : ${{ secrets.NPM_TOKEN_ORG }}
79- release-pr :
80- name : Publish PR
81- runs-on : ubuntu-latest
82- needs : test
83- if : ${{ github.event_name == 'pull_request' }}
84- environment : Preview
85- steps :
86- - name : Init
87- uses : actions/checkout@v3
88- - name : Install pnpm
89- uses : pnpm/action-setup@v4.0.0
90- - name : Setup Node
91- uses : actions/setup-node@v3
92- with :
93- node-version : 18
94- cache : " pnpm"
95- - name : Install dependencies
96- run : pnpm install
97- - name : Determine version
98- uses : ./.github/version-pr
99- id : determine-version
100- env :
101- PR_NUMBER : ${{ github.event.number }}
102- - name : Publish to npm
103- run : |
104- cd packages/next-auth
105- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
106- pnpm publish --no-git-checks --access public --tag experimental
107- env :
108- NPM_TOKEN : ${{ secrets.NPM_TOKEN_PKG }}
109- - name : Comment version on PR
110- uses : NejcZdovc/comment-pr@v2
111- with :
112- message :
113- " 🎉 Experimental release [published 📦️ on npm](https://npmjs.com/package/next-auth/v/${{ env.VERSION }})!\n \
114- ```sh\n pnpm add next-auth@${{ env.VERSION }}\n ```\n \
115- ```sh\n yarn add next-auth@${{ env.VERSION }}\n ```\n \
116- ```sh\n npm i next-auth@${{ env.VERSION }}\n ```"
117- env :
118- VERSION : ${{ steps.determine-version.outputs.version }}
119- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments