Merge pull request #32 from netlify/release-please--branches--main--c… #94
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-please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| steps: | |
| - uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| id: get-token | |
| with: | |
| private-key: ${{ secrets.TOKENS_PRIVATE_KEY }} | |
| app-id: ${{ secrets.TOKENS_APP_ID }} | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ steps.get-token.outputs.token }} | |
| release-type: node | |
| package-name: "@netlify/axis" | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| needs: create-release | |
| if: ${{ needs.create-release.outputs.release_created }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: npm | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: npm ci --no-audit | |
| - name: Build project | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test | |
| # TODO: re-enable `--provenance` (and `id-token: write` permission above) once the repo is public. | |
| # npm provenance verification rejects private source repos. | |
| - name: Publish package | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |