feat: add release script to handle version bumps and tagging #19
This file contains hidden or 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: Changeset Version | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # Required for npm OIDC publishing | |
| jobs: | |
| release: | |
| name: Create version PR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Upgrade npm for OIDC support | |
| run: npm install -g npm@latest | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Create version PR | |
| uses: changesets/action@v1 | |
| with: | |
| publish: npm run release | |
| commit: 'chore: release' | |
| title: 'chore(release): version packages' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |