Skip to content

Add OIDC trusted publishing workflow for npm#16

Merged
pulpdrew merged 2 commits into
mainfrom
copilot/set-up-gh-workflow-for-npm-publish
Jun 9, 2026
Merged

Add OIDC trusted publishing workflow for npm#16
pulpdrew merged 2 commits into
mainfrom
copilot/set-up-gh-workflow-for-npm-publish

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Adds a GitHub Actions workflow to publish @clickhouse/parser to npm using OIDC trusted publishing, eliminating the need for long-lived NPM_TOKEN secrets.

Changes

  • New .github/workflows/publish.yml — publishes on release: published (plus manual workflow_dispatch).
  • OIDC authid-token: write permission enables short-lived token exchange; no npm secret stored.
  • npm-publish environment — scopes the job so environment protection rules (required reviewers, etc.) gate publishes.
  • Node 24 — ships with an npm version new enough (≥ 11.5.1) for trusted publishing, avoiding a manual npm upgrade step.
  • Provenancenpm publish --provenance --access public attaches build provenance attestations.
permissions:
  contents: read
  id-token: write
environment: npm-publish

Follow-up (outside this repo)

  • Register the repo + publish.yml + npm-publish environment as a trusted publisher on npmjs.com.
  • Create the npm-publish environment in repo settings.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@peter-leonov-ch peter-leonov-ch marked this pull request as ready for review June 9, 2026 11:21
@pulpdrew pulpdrew merged commit ad75854 into main Jun 9, 2026
3 checks passed
@pulpdrew pulpdrew deleted the copilot/set-up-gh-workflow-for-npm-publish branch June 9, 2026 11:36
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.

4 participants