Skip to content

Commit b95c069

Browse files
committed
npm trusted publisher
1 parent 4282719 commit b95c069

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ jobs:
3838
needs: guard-default-branch
3939
if: ${{ inputs.target == 'all' || inputs.target == 'lsp' }}
4040
runs-on: ubuntu-latest
41+
environment: npm
42+
permissions:
43+
contents: read
44+
id-token: write
4145
steps:
4246
- uses: actions/checkout@v4
43-
- uses: actions/setup-node@v4
47+
- uses: actions/setup-node@v6
4448
with:
45-
node-version: "20"
46-
cache: npm
47-
cache-dependency-path: package-lock.json
48-
registry-url: https://registry.npmjs.org
49+
node-version: "24.x"
50+
package-manager-cache: false
4951
- name: Install dependencies
5052
run: npm ci
5153
- name: Validate the CLI
5254
run: npm run check
5355
- name: Publish to npm
54-
env:
55-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5656
run: npm publish --access public
5757

5858
publish-vscode-extension:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ The workflow reads the package versions from the package metadata already in the
150150

151151
It expects these credentials/configs:
152152

153-
- `NPM_TOKEN` for the npm publish step
153+
- A npm Trusted Publisher configured for `Open-Inflation/engine-reverse-ide`, workflow `publish.yml`, and the `npm` environment
154154
- `VSCE_PAT` for the VS Code Marketplace publish step
155-
- A PyPI Trusted Publisher configured for this repository workflow and the `pypi` environment
155+
- A PyPI Trusted Publisher configured for `Open-Inflation/engine-reverse-ide`, workflow `publish.yml`, and the `pypi` environment
156156

157-
The PyPI job uses GitHub OIDC through the official `pypa/gh-action-pypi-publish` action, so it does not need an API token secret.
157+
The npm and PyPI jobs use GitHub OIDC, so they do not need API token secrets.
158158

159159
## Language overview
160160

0 commit comments

Comments
 (0)