Skip to content

Commit db6082d

Browse files
committed
chore: fix npm-publish dependencies and add provenance
1 parent 9afaf00 commit db6082d

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

.github/workflows/release-please.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,41 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
7+
workflow_dispatch:
88

99
jobs:
1010
release-please:
1111
outputs:
12-
pr: ${{ steps.release.outputs.pr }}
12+
release_created: ${{ steps.release.outputs.release_created }}
1313
permissions:
1414
contents: write # to create release commit (googleapis/release-please-action)
1515
pull-requests: write # to create release PR (googleapis/release-please-action)
16-
if: github.event_name == 'push'
1716
runs-on: ubuntu-latest
1817
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
18+
- uses: googleapis/release-please-action@v4
19+
id: release
20+
# Standard Conventional Commits: `feat` and `fix`
21+
# node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test`
22+
# node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove`
23+
# Core abstract category: `deps`
24+
# Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos`
25+
# Documentation: `doc`, `docs`, `readme`
26+
# Standard Conventional Commits: `chore` (under "Miscellaneous")
27+
# Miscellaneous abstract categories: `refactor`, `ci`, `meta`
3528

3629
npm-publish:
3730
needs: release-please
3831
if: ${{ needs.release-please.outputs.release_created }}
3932
runs-on: ubuntu-latest
33+
permissions:
34+
contents: read
35+
id-token: write # to generate npm provenance statements
4036
steps:
4137
- uses: actions/checkout@v4
4238
- uses: actions/setup-node@v4
4339
with:
4440
node-version: lts/*
4541
registry-url: 'https://registry.npmjs.org'
46-
- run: npm publish --access public
42+
- run: npm publish --provenance --access public
4743
env:
4844
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)