Skip to content

chore: use OIDC for npm publishing#2990

Merged
HerrCai0907 merged 1 commit intoAssemblyScript:mainfrom
CountBleck:oidc
Mar 10, 2026
Merged

chore: use OIDC for npm publishing#2990
HerrCai0907 merged 1 commit intoAssemblyScript:mainfrom
CountBleck:oidc

Conversation

@CountBleck
Copy link
Member

Also, bump the actions versions in publish.yml while we're at it.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

Also, bump the actions versions in publish.yml while we're at it.
ref: main
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is also needed.

registry-url: "https://registry.npmjs.org"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? I don't think it was needed for aspublish.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether it is needed for OIDC. since I meet some error when missing this item.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

let me merge it and try to release

@HerrCai0907 HerrCai0907 merged commit 52b9533 into AssemblyScript:main Mar 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants