Skip to content

Commit 0d100c1

Browse files
authored
Update publish workflow to use npm for publishing
1 parent ca19526 commit 0d100c1

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
needs:
5353
- changepacks
5454
if: contains(needs.changepacks.outputs.changepacks, 'package.json')
55+
permissions:
56+
id-token: write
5557
steps:
5658
- name: Checkout
5759
uses: actions/checkout@v5
@@ -68,6 +70,15 @@ jobs:
6870
token: ${{ secrets.CODECOV_TOKEN }}
6971
fail_ci_if_error: true
7072
files: ./coverage/lcov.info
71-
- run: bun publish --access public --ignore-scripts
72-
env:
73-
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
73+
74+
# npm (not bun) does the actual publish: bun cannot perform the npm OIDC
75+
# token exchange. Trusted Publishing needs npm >= 11.5.1.
76+
- uses: actions/setup-node@v6
77+
with:
78+
node-version: "24"
79+
registry-url: "https://registry.npmjs.org"
80+
81+
- name: Ensure npm >= 11.5.1 (OIDC Trusted Publishing)
82+
run: npm install -g npm@latest
83+
84+
- run: npm publish --access public --ignore-scripts

0 commit comments

Comments
 (0)