NPM publishing#5
Merged
Merged
Conversation
| "homepage": "https://microsoft.github.io/code-push", | ||
| "homepage": "https://github.com/bitrise-io/react-native-code-push", | ||
| "keywords": [ | ||
| "react-native", |
There was a problem hiding this comment.
What about Expo? Can we add Expo as keyword?
| ] | ||
| }, | ||
| "commands": { | ||
| "postlink": "node node_modules/@code-push-next/react-native-code-push/scripts/postlink/run", |
Collaborator
Author
There was a problem hiding this comment.
This is actually dead code, RNPM was archived 10 years ago: https://github.com/rnpm/rnpm
I'll have a follow-up PR where all of these dead configs are removed
ofalvai
force-pushed
the
npm-publish-via-tags
branch
from
July 15, 2026 14:32
e4f1ad4 to
e92cade
Compare
ofalvai
force-pushed
the
npm-publish-via-tags
branch
from
July 16, 2026 07:09
e92cade to
bf58d01
Compare
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 a GitHub Actions workflow that publishes
@bitrise/code-push-sdkto npm whenever avX.Y.Ztag is pushed, using npm's OIDC-based Trusted Publishing instead of a long-lived npm token.Changes
package.json: renamed the package to@bitrise/code-push-sdk, updatedhomepage/repository/authorto point at this repo, and changedversionto the placeholder string"set-at-publish"— the git tag is now the single source of truth for the published version, injected by CI right before publish (never committed back), so this field no longer needs manual bumping per release..github/workflows/publish.yml(new): triggers onv*.*.*tag pushes.mise.toml: bumpednodefrom22to24, since npm's OIDC trusted-publishing flow requires npm >= 11.5.1, which Node 24 bundles by default (Node 22 ships npm 10.x).Why Trusted Publishing instead of an
NPM_TOKENsecretThis is a public repo, so CI logs are world-readable, and 2025 saw multiple supply-chain incidents (tj-actions/changed-files, the Shai-Hulud npm worm) that specifically harvested long-lived
NPM_TOKEN/GITHUB_TOKENsecrets out of CI. Trusted Publishing (GA July 2025) removes that attack surface entirely:permissions: id-token: write) that GitHub signs, asserting which repo/workflow is running.--provenanceadditionally attaches a signed build attestation to the published package.The publish workflow itself only triggers on tag pushes (not
pull_request/pull_request_target), so fork PRs can never run it.Manual setup (already done for the bootstrap publish)
Trusted Publisher entries can only be registered for a package that already exists on npm, so the very first version under this new scope/name had to be published manually once: https://www.npmjs.com/package/@bitrise/code-push-sdk?activeTab=versions
After that, the Trusted Publisher was registered at
npmjs.com/package/@bitrise/code-push-sdk/access(GitHub Actions, orgbitrise-io, reporeact-native-code-push, workflow filenamepublish.yml). All subsequent releases go through this workflow with no secrets involved — just push avX.Y.Ztag.