chore: use OIDC for npm publishing#2990
Merged
HerrCai0907 merged 1 commit intoAssemblyScript:mainfrom Mar 10, 2026
Merged
Conversation
Also, bump the actions versions in publish.yml while we're at it.
HerrCai0907
reviewed
Mar 9, 2026
| ref: main | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| - uses: actions/setup-node@v6 |
Member
There was a problem hiding this comment.
Maybe it is also needed.
registry-url: "https://registry.npmjs.org"
Member
Author
There was a problem hiding this comment.
Are you sure? I don't think it was needed for aspublish.
Member
There was a problem hiding this comment.
I am not sure whether it is needed for OIDC. since I meet some error when missing this item.
Member
There was a problem hiding this comment.
This is official example from https://docs.npmjs.com/trusted-publishers#github-actions-configuration
name: Publish Package
on:
push:
tags:
- 'v*'
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm publish
HerrCai0907
approved these changes
Mar 9, 2026
Member
|
let me merge it and try to release |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also, bump the actions versions in publish.yml while we're at it.