Skip to content

ci: add OIDC-based npm publish workflow for tagged releases#8

Merged
hustcc merged 2 commits into
mainfrom
copilot/add-oidc-publish-method
Jul 14, 2026
Merged

ci: add OIDC-based npm publish workflow for tagged releases#8
hustcc merged 2 commits into
mainfrom
copilot/add-oidc-publish-method

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR adds an OIDC trusted publishing path for npm releases, aligned with the v*.*.* tag-based release flow. It introduces a dedicated publish workflow modeled after the referenced pattern, without token-based npm auth.

  • Release trigger and scope

    • Adds a new workflow at .github/workflows/publish.yml.
    • Triggers on pushed tags matching v*.*.* to isolate publish behavior to versioned releases.
  • OIDC trusted publishing setup

    • Configures workflow permissions for OIDC:
      • id-token: write
      • contents: read
    • Uses npm provenance publish mode via npm publish --provenance --access public.
  • Publish pipeline

    • Checks out source, sets up Node + npm registry, installs dependencies, builds package, then publishes.
permissions:
  id-token: write
  contents: read

on:
  push:
    tags:
      - 'v*.*.*'

# ...
- name: Publish to npm
  run: npm publish --provenance --access public

@hustcc hustcc marked this pull request as ready for review July 14, 2026 14:16
@hustcc hustcc merged commit 3a02436 into main Jul 14, 2026
1 check passed
@hustcc hustcc deleted the copilot/add-oidc-publish-method branch July 14, 2026 14:16
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