Merge pull request #300 from ideal-postcodes/updates #213
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: 24 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - name: Update npm for OIDC support | |
| run: npm install -g npm@latest | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Unit Tests | |
| run: pnpm test | |
| - name: Smoke test | |
| run: node smoke.js | |
| - name: Semantic Release | |
| run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |