Merge pull request #284 from ideal-postcodes/updates #208
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: | |
| - main | |
| - beta | |
| jobs: | |
| build: | |
| # Important this runs on Github Actions infra | |
| # npm publish will fail anywhere else (e.g. blacksmith) | |
| 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: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Unit Tests | |
| run: pnpm test | |
| - name: Semantic Release | |
| # Use npx instead of pnpm to ensure npm OIDC token is passed correctly | |
| run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |