Skip to content

Commit 7bbffec

Browse files
authored
update: publish workflow changed to OIDC (#8469)
1 parent a8e90d5 commit 7bbffec

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write # Required for OIDC (Trusted Publishing)
9+
contents: read
10+
711
jobs:
812
npm-publish:
913
if: ${{ !github.event.release.draft }}
1014
runs-on: ubuntu-latest
11-
environment: release
15+
environment: npmjs
1216
steps:
13-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1418
with:
1519
ref: ${{ github.event.release.target_commitish }}
1620
- run: git fetch --force --tags
17-
- uses: actions/setup-node@v3
21+
- uses: actions/setup-node@v4
1822
with:
19-
node-version: 18
23+
node-version: 24
2024
registry-url: 'https://registry.npmjs.org'
21-
- run: npm install
25+
- run: npm ci
2226
- run: npm run publish-please-only
23-
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2527
docker-publish:
2628
needs: npm-publish
2729
runs-on: ubuntu-latest
2830
environment: release
2931
steps:
30-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3133
with:
3234
ref: ${{ github.event.release.target_commitish }}
3335
- run: git fetch --force --tags
34-
- uses: actions/setup-node@v3
36+
- uses: actions/setup-node@v4
3537
with:
36-
node-version: 18
38+
node-version: 24
3739
registry-url: 'https://registry.npmjs.org'
38-
- uses: docker/login-action@v1
40+
- uses: docker/login-action@v3
3941
with:
4042
username: ${{ secrets.DOCKERHUB_USERNAME }}
4143
password: ${{ secrets.DOCKERHUB_TOKEN }}
42-
- run: npm install
44+
- run: npm ci
4345
- run: npx gulp build
44-
- run: gulp docker-publish
45-
env:
46-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
- run: gulp docker-publish

0 commit comments

Comments
 (0)