fix(Release): Update semantic release #399
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: Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - beta | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| # https://docs.npmjs.com/trusted-publishers#github-actions-configuration | |
| permissions: | |
| id-token: write # Required for npm OIDC | |
| contents: write # Required for semantic-release to create releases/tags | |
| issues: write # Required for semantic-release to comment on issues | |
| pull-requests: write # Required for semantic-release to comment on PRs | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.ref }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| - name: Semantic Release | |
| # Use npx to ensure npm OIDC token is passed correctly | |
| run: npx semantic-release --no-ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |