π¦ [Changesets] Prepare for next release (#57) #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: π Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Version and release package | |
runs-on: ubuntu-latest | |
steps: | |
- name: π³οΈ Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: π§ Setup Node 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: π¦ Install dependencies | |
run: npm ci | |
- name: ποΈ Build project | |
run: npm run build | |
- name: π£ Create PR or publish to NPM | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
title: 'π¦ [Release] Version packages' | |
commit: 'π¦ [Changesets] Prepare for next release' | |
version: npm run release:version | |
publish: npm run release:publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |