ci: add publishing workflow with OIDC and provenance attestations for v0.x#10639
Merged
jasonsaayman merged 1 commit intoaxios:v0.xfrom Apr 3, 2026
Merged
ci: add publishing workflow with OIDC and provenance attestations for v0.x#10639jasonsaayman merged 1 commit intoaxios:v0.xfrom
jasonsaayman merged 1 commit intoaxios:v0.xfrom
Conversation
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.
Summary
Adds
publish.ymlto enable OIDC Trusted Publishing and provenance attestations for v0.x releases.The v0.x line has never had a CI publish workflow. Every release from v0.28.0 through v0.30.3 was published manually/locally using a npm token.
The workflow is identical to v1.x's
publish.ymlexcept for the tag pattern (v0.*.*) and--tag old-version.Prior attempts
There was a prior attempt in #7407 that was deleted before it ever ran successfully. The main issues were renaming the workflow file (which breaks Trusted Publisher matching, since npm keys on
(repo, workflow_filename)), using a tag pattern without thevprefix (doesn't match existing tags), and trying to do version bumping and git push-back inside the workflow. This PR avoids all of that by keeping the filename aspublish.yml, usingv0.*.*to match existing tag conventions, and doing publish-only with no version manipulation.Multi-branch OIDC
npm's Trusted Publisher config has no branch field; it matches on
(repository, workflow_filename, optional_environment)only. The existing config (owner:axios, repo:axios, workflow:publish.yml) covers this workflow with no changes needed on npmjs.com.Verified empirically with
@shaanmajid/npm-multibranch-oidc-test(repo): both a v1.x and v0.x branch published via OIDC with provenance using a single Trusted Publisher entry.dist-tag
Publishes with
--tag old-version. Current state:{ "latest": "1.14.0", "next": "1.7.0-beta.2", "old-version": "0.30.0" }old-versionpoints to 0.30.0 despite 0.30.1, 0.30.2, and 0.30.3 all existing on npm (published manually without--tag old-version). This will correct itself on the next v0.x release since the workflow uses--tag old-version.Maintainer checklist
These should already be done from #10619, but listing for completeness since I can't verify them externally:
npmjs.com
axios, repoaxios, workflowpublish.yml, environment blankGitHub
NPM_TOKENsecret deletedv*.*.*tag creation (Settings > Rules > Rulesets > New tag ruleset). There are currently no tag rulesets on this repo, so anyone with write access can push a tag and trigger a publish.Summary by cubic
Adds a
publish.ymlGitHub Actions workflow to enable OIDC Trusted Publishing for v0.x releases. It triggers onv0.*.*tags and publishes tonpmwith--tag old-versionand provenance, replacing manual token-based publishes.Description
Summary of changes
.github/workflows/publish.ymlwithid-token: write, Node 24, build, andnpm publish --provenance --access public --tag old-version.v0.*.*.Reasoning
Additional context
(repository, workflow_filename[, environment]); usingpublish.ymlensures v0.x is covered without new npm config.old-versiondist-tag will update automatically on the next v0.x release.Docs
axios, repoaxios, workflowpublish.yml(no environment).NPM_TOKENfrom repo secrets if present.v*.*.*creation.Testing
v0.*.*tag.old-version.Written for commit 78f5653. Summary will update on new commits.