File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -164,3 +164,50 @@ jobs:
164164
165165 - name : Build
166166 run : pnpm build
167+
168+ release :
169+ name : Release
170+ needs : [build]
171+ if : github.ref == 'refs/heads/main'
172+ runs-on : ubuntu-latest
173+ steps :
174+ - name : Checkout
175+ uses : actions/checkout@v3
176+
177+ - name : Setup Node
178+ uses : actions/setup-node@v3
179+ with :
180+ node-version : 18
181+
182+ - uses : pnpm/action-setup@v2
183+ name : Install pnpm
184+ with :
185+ version : 7
186+ run_install : false
187+
188+ - name : Get pnpm store directory
189+ id : pnpm-cache
190+ shell : bash
191+ run : |
192+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
193+
194+ - uses : actions/cache@v3
195+ name : Setup pnpm cache
196+ with :
197+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
198+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
199+ restore-keys : |
200+ ${{ runner.os }}-pnpm-store-
201+
202+ - name : Create and publish versions
203+ uses : changesets/action@v1
204+ with :
205+ title : " Release new version"
206+ commit : " update version"
207+ publish : pnpm publish
208+ env :
209+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
210+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
211+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
212+
213+
You can’t perform that action at this time.
0 commit comments