|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - main
|
7 |
| - pull_request: |
8 | 7 |
|
9 | 8 | jobs:
|
10 | 9 | release-please:
|
11 | 10 | outputs:
|
12 |
| - pr: ${{ steps.release.outputs.pr }} |
| 11 | + release_created: ${{ steps.release.outputs.release_created }} |
13 | 12 | permissions:
|
14 | 13 | contents: write # to create release commit (googleapis/release-please-action)
|
15 | 14 | pull-requests: write # to create release PR (googleapis/release-please-action)
|
16 |
| - if: github.event_name == 'push' |
17 | 15 | runs-on: ubuntu-latest
|
18 | 16 | steps:
|
19 |
| - - uses: googleapis/release-please-action@v4 |
20 |
| - id: release |
21 |
| - # Standard Conventional Commits: `feat` and `fix` |
22 |
| - # node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test` |
23 |
| - # node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove` |
24 |
| - # Core abstract category: `deps` |
25 |
| - # Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos` |
26 |
| - # Documentation: `doc`, `docs`, `readme` |
27 |
| - # Standard Conventional Commits: `chore` (under "Miscellaneous") |
28 |
| - # Miscellaneous abstract categories: `refactor`, `ci`, `meta` |
29 |
| - |
30 |
| - test: |
31 |
| - name: Release Test |
32 |
| - needs: [ release-please ] |
33 |
| - if: needs.release-please.outputs.pr || startsWith(github.head_ref, 'release-please--') |
34 |
| - uses: ./.github/workflows/tests.yml |
| 17 | + - uses: googleapis/release-please-action@v4 |
| 18 | + id: release |
| 19 | + # Standard Conventional Commits: `feat` and `fix` |
| 20 | + # node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test` |
| 21 | + # node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove` |
| 22 | + # Core abstract category: `deps` |
| 23 | + # Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos` |
| 24 | + # Documentation: `doc`, `docs`, `readme` |
| 25 | + # Standard Conventional Commits: `chore` (under "Miscellaneous") |
| 26 | + # Miscellaneous abstract categories: `refactor`, `ci`, `meta` |
35 | 27 |
|
36 | 28 | npm-publish:
|
37 | 29 | needs: release-please
|
38 | 30 | if: ${{ needs.release-please.outputs.release_created }}
|
39 | 31 | runs-on: ubuntu-latest
|
| 32 | + permissions: |
| 33 | + contents: read |
| 34 | + id-token: write # to generate npm provenance statements |
40 | 35 | steps:
|
41 | 36 | - uses: actions/checkout@v4
|
42 | 37 | - uses: actions/setup-node@v4
|
43 | 38 | with:
|
44 | 39 | node-version: lts/*
|
45 | 40 | registry-url: 'https://registry.npmjs.org'
|
46 |
| - - run: npm publish --access public |
| 41 | + - run: npm publish --provenance --access public |
47 | 42 | env:
|
48 | 43 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
0 commit comments