Skip to content

Commit 6c922e9

Browse files
committed
try new auth system
1 parent 93ee08c commit 6c922e9

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

.github/workflows/hub-publish.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,30 @@ defaults:
2323
run:
2424
working-directory: packages/hub
2525

26+
permissions:
27+
contents: write
28+
id-token: write
29+
packages: write
30+
2631
jobs:
2732
version_and_release:
2833
runs-on: ubuntu-latest
2934
steps:
30-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v5
3136
with:
3237
# Needed to push the tag and the commit on the main branch, otherwise we get:
3338
# > Run git push --follow-tags
3439
# remote: error: GH006: Protected branch update failed for refs/heads/main.
3540
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
3641
token: ${{ secrets.BOT_ACCESS_TOKEN }}
3742
- run: npm install -g corepack@latest && corepack enable
38-
- uses: actions/setup-node@v3
43+
- uses: actions/setup-node@v4
3944
with:
40-
node-version: "20"
45+
node-version: "24"
4146
cache: "pnpm"
4247
cache-dependency-path: |
4348
packages/hub/pnpm-lock.yaml
4449
packages/doc-internal/pnpm-lock.yaml
45-
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
46-
registry-url: "https://registry.npmjs.org"
4750
- run: pnpm install
4851
- run: git config --global user.name machineuser
4952
- run: git config --global user.email [email protected]
@@ -61,19 +64,20 @@ jobs:
6164
name: "Check Deps are published before publishing this package"
6265
run: pnpm -w check-deps tasks
6366

64-
- run: pnpm publish --no-git-checks .
65-
env:
66-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6767
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
68+
69+
- run: pnpm publish --no-git-checks .
70+
6871
# hack - reuse actions/setup-node@v3 just to set a new registry
69-
- uses: actions/setup-node@v3
72+
- uses: actions/setup-node@v4
7073
with:
71-
node-version: "20"
74+
node-version: "24"
7275
registry-url: "https://npm.pkg.github.com"
76+
7377
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
74-
# - run: pnpm publish --no-git-checks .
75-
# env:
76-
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
- run: pnpm publish --no-git-checks .
79+
env:
80+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7781
- name: "Update Doc"
7882
uses: peter-evans/repository-dispatch@v2
7983
with:

0 commit comments

Comments
 (0)