This guide is for project maintainers who need to set up publishing infrastructure or troubleshoot release issues.
The repository uses Changesets with GitHub Actions for automated publishing.
- Developer creates changeset with
pnpm changeset - Developer opens PR (CI runs lint/test/build)
- PR merges to
main - Release workflow creates/updates "Version Packages" PR
- Merge "Version Packages" PR
- Packages auto-publish to NPM with provenance
This repository uses NPM Trusted Publishing via OIDC (OpenID Connect), which eliminates the need for long-lived NPM tokens.
- GitHub Actions workflow has
id-token: writepermission - NPM packages are configured with GitHub as a trusted publisher
- During publish, GitHub provides a short-lived OIDC token to NPM
- NPM validates the token and allows publishing
- All publishes include cryptographic provenance
For each package, configure trusted publishing on NPM:
- Go to
https://www.npmjs.com/package/PACKAGE_NAME/access - Under "Publishing access", select "Trusted publishers"
- Click "Add trusted publisher"
- Configure:
- Provider: GitHub Actions
- GitHub Organization:
youversion(or your org) - Repository:
platform-sdk-react - Workflow:
release.yml - Environment: Leave empty
Required packages:
@youversion/platform-core@youversion/platform-react-hooks@youversion/platform-react-ui
- No NPM_TOKEN to rotate or manage
- Stronger security via short-lived tokens
- Automatic provenance generation
- Audit trail of all publishes
- Check changesets exist in
.changeset/directory - Verify CI passes on main branch
- Review Release workflow logs in GitHub Actions
- Verify trusted publishing is configured for all packages on NPM
- Check NPM permissions for
@youversionscope - Ensure GitHub Actions workflow has
id-token: writepermission - Review Release workflow logs
Cannot unpublish after 72 hours. Within 72 hours:
npm unpublish @youversion/package-name@versionBetter: Publish a patch version with the fix.
npm deprecate @youversion/package-name@1.0.0 "Use 1.0.1+ - fixes critical bug"- Check NPM status page
- Verify package name isn't taken
- Ensure
publishConfig.access: "public"in package.json - Review Release workflow logs
Important: Manual publishing from local machines is not supported with trusted publishing. Packages can only be published via the GitHub Actions workflow.
If the automated workflow fails:
- Fix the issue in the workflow
- Re-trigger the release by:
- Pushing a fix to the "Version Packages" PR, or
- Manually re-running the Release workflow from GitHub Actions UI
If you absolutely must publish manually (requires NPM account access):
# 1. Create changeset
pnpm changeset
# 2. Version packages
pnpm version-packages
# 3. Build all packages
pnpm build
# 4. Publish (requires NPM authentication and account to be added as trusted publisher)
npm login
pnpm releaseNote: Manual publishing requires:
- NPM account with publish access to
@youversionscope - Account configured as a trusted publisher on NPM
- Will include provenance if using
npmCLI with proper authentication
- Go to Actions tab
- CI workflow (PRs)
- Release workflow (main branch)
- Visit
https://www.npmjs.com/package/@youversion/platform-react-ui - Verify version updated
- Check provenance badge
git fetch --tags
git tag -l "@youversion/*"