Skip to content

chore(release): add CI release pipeline with npm provenance - #52

Merged
jkasprzyk17 merged 3 commits into
mainfrom
chore/release-pipeline
Aug 20, 2026
Merged

chore(release): add CI release pipeline with npm provenance#52
jkasprzyk17 merged 3 commits into
mainfrom
chore/release-pipeline

Conversation

@jkasprzyk17

@jkasprzyk17 jkasprzyk17 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Moves publishing off developer machines and into CI, so releases are reproducible
and carry an npm provenance attestation. 1.0.0 was published locally and has
attestations: None on the registry.

Also adds CHANGELOG.md, seeded with 1.0.0 and the notes for the upcoming
1.1.0.

What changed

  • .github/workflows/release.ymlworkflow_dispatch release with an
    increment input (auto derives the bump from conventional commits) and a
    dry_run toggle that defaults to on. Runs the same gate as CI, then publishes
    with --provenance using npm trusted publishing (OIDC, id-token: write).
  • package/.release-it.json — adds @release-it/conventional-changelog for
    bump inference and generated GitHub Release notes. npm.skipChecks: true is
    required because release-it otherwise runs npm whoami at startup, which fails
    under trusted publishing where the token is only minted at publish time.
  • CHANGELOG.md — hand-curated, with a prominent Behavior changes
    section for 1.1.0 (see below).
  • RELEASING.md — the process, plus the one-time npm and branch-protection setup.

Why the changelog is not generated

Two changes in 1.1.0 alter runtime behavior without changing any type
signatures, so consumer code keeps compiling but behaves differently:

Neither is derivable from commit subjects. Related: Fix threading issues on ios
(#43) is not a conventional commit, so it is absent from the auto-generated notes
entirely — verified by running release-it --changelog. The workflow fails if
CHANGELOG.md has no section for the version being released.

Verification

  • release-it --release-version resolves 1.1.0 from the commits since v1.0.0
  • actionlint clean on all workflows
  • changelog guard tested against present/absent versions, including that 1.1.01
    does not false-match 1.1.0
  • npm version guard tested at the 11.5.1 boundary

Before the first CI release

Trusted publishing must be configured on npmjs.com for this package
(repo gmi-software/react-native-better-maps, workflow release.yml), and
github-actions[bot] needs to be able to push the release commit and tag to
main. Both are documented in RELEASING.md.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Publish from GitHub Actions via npm trusted publishing (OIDC) instead of a
developer machine, so every release carries a provenance attestation and no
long-lived npm token is stored anywhere.

Version bumps are derived from conventional commits by release-it. CHANGELOG.md
stays hand-curated, because behavior changes and migration notes cannot be
derived from commit subjects; a workflow guard refuses to publish a version that
has no changelog entry.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 15b976e5-9e2e-4bcd-9dd9-5f2a344da9bd

📥 Commits

Reviewing files that changed from the base of the PR and between 7cc0331 and 41accb0.

📒 Files selected for processing (1)
  • RELEASING.md

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added native points-of-interest press events.
    • Added Expo SDK 57 support.
    • Camera methods now return a Promise<void>.
  • Bug Fixes

    • Region-change callbacks now fire once per gesture.
    • Improved region handling to avoid unnecessary updates.
    • Resolved iOS threading and deadlock issues.
    • Improved Android SDK alignment and first-time builds.
  • Documentation

    • Added version history and release process documentation.

Walkthrough

The pull request adds a GitHub Actions release workflow for version tags and manual rehearsals. It configures release-it for npm provenance and Conventional Commits. It documents versioning, changelog, OIDC, validation, and publication procedures.

Changes

npm release pipeline

Layer / File(s) Summary
Release-it configuration
package/.release-it.json, package/package.json
Release-it now supports npm provenance, skipped npm startup checks, and Conventional Commits.
Release workflow
.github/workflows/release.yml
The workflow validates versions and changelog entries, rejects published versions, runs code generation and verification gates, and publishes or rehearses releases.
Release records and procedures
CHANGELOG.md, CONTRIBUTING.md, RELEASING.md
The changelog records versions 1.1.0 and 1.0.0. Documentation describes CI releases, OIDC setup, versioning, and dry runs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 41acc

The release workflow and supporting documentation are merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Possibly related PRs

Suggested labels: review

Suggested reviewers: piotr-graczyk-dev


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Security Check ❌ Error High: the new workflow publishes code from any matching tag. It only checks tag/package version, then runs repository-controlled commands with contents:id-token write, enabling a writer to tag a ma... Protect release tags and verify the tag commit is an approved main commit before granting publish permissions. Use a protected environment for npm publishing.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies a release CI pipeline change and uses a valid PR type, although it exceeds the preferred 50-character length.
Description check ✅ Passed The description clearly explains the CI release pipeline, npm provenance, changelog, release configuration, and supporting documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

React Doctor found 8 issues in 5 files · 2 errors & 6 warnings · score 64 / 100 (Needs work) · full project

Errors

6 warnings

App.tsx

  • ⚠️ L729 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L734 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L735 Side effect inside a state updater function no-side-effect-in-state-updater-function

package.json

  • ⚠️ L0 unused-dev-dependency

src/hooks/index.ts

  • ⚠️ L0 unused-file

src/utils/enteringAnimation.ts

  • ⚠️ L33 unused-export

Reviewed by React Doctor for commit 41accb0. See inline comments for fixes.

coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

85-106: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Handle the "no releasable commits" case explicitly.

Silence is not a plan. If release-it has nothing to release, don't let the pipeline stumble into a confusing failure three steps later.

release-it --release-version "prints nothing and exits successfully" when there is no next version to release, per release-it's own documentation: Add the --release-version flag to print the next version without releasing anything. If no next version is available, it prints nothing and exits successfully. In that case version (Line 95) is empty, GITHUB_OUTPUT receives version= (Line 97), and the CHANGELOG check (Lines 102-106) produces an unhelpful CHANGELOG.md has no '## ' section error instead of telling the operator that there's simply nothing to release.

🛡️ Proposed fix to fail with a clear message
           version="$(bunx release-it "${args[@]}")"
+          if [ -z "$version" ]; then
+            echo "::error::No releasable version was resolved (no conventional-commit bump since the last tag)."
+            exit 1
+          fi
           echo "Resolved version: $version"
           echo "version=$version" >> "$GITHUB_OUTPUT"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 85 - 106, Update the Resolve
target version step around the version assignment and GITHUB_OUTPUT write to
detect an empty release-it result and exit immediately with a clear “no
releasable commits” message. Only write the version output when a non-empty
version is returned, leaving the existing CHANGELOG verification unchanged for
valid releases.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 49-56: Remove the registry-url input from the Setup Node.js step
in the OIDC release job. Keep node-version 24 unchanged, and rely on the
registry configuration already defined in package/package.json so setup-node
does not generate an _authToken entry or placeholder NODE_AUTH_TOKEN before
publishing.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 85-106: Update the Resolve target version step around the version
assignment and GITHUB_OUTPUT write to detect an empty release-it result and exit
immediately with a clear “no releasable commits” message. Only write the version
output when a non-empty version is returned, leaving the existing CHANGELOG
verification unchanged for valid releases.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0a73fa7b-a607-45a0-88f4-4eb1936028da

📥 Commits

Reviewing files that changed from the base of the PR and between 9e7bc0d and 1cedac7.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • .github/workflows/release.yml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • RELEASING.md
  • package/.release-it.json
  • package/package.json

Comment thread .github/workflows/release.yml
`main` enforces pull request reviews with `enforce_admins` enabled, so the
previous design could not have worked: github-actions[bot] cannot push a release
commit, and the failing push would have run after `npm publish` had already
succeeded, leaving a published version with no tag or release.

Publishing is now triggered by pushing a version tag. The version bump lands
through a normal reviewed pull request, and CI never writes to git. It verifies
the tag matches package.json, that a changelog section exists, and that the
version is not already on npm, then publishes and creates the release.

Also drops registry-url from setup-node: it writes an _authToken entry into
.npmrc, which makes npm assume classic token auth and skip the OIDC flow.
coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 117-130: Update the Publish step’s release arguments to ensure
prerelease versions are not published under npm’s latest dist-tag. In the
release flow around the args array and package/.release-it.json configuration,
supply a non-latest tag such as next when publishing prereleases, or explicitly
reject prerelease tags; preserve the existing dry-run behavior for non-push
events.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 28b7ebcc-b074-4f5e-b0fc-aebc2c6f2129

📥 Commits

Reviewing files that changed from the base of the PR and between 1cedac7 and 7cc0331.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • RELEASING.md
  • package/.release-it.json
💤 Files with no reviewable changes (1)
  • package/.release-it.json

Comment thread .github/workflows/release.yml
Tagging a prerelease version publishes under a matching dist-tag instead of
latest, and marks the GitHub Release as a pre-release. release-it derives both
from the version, so no extra configuration is needed - verified with a dry run
against 1.1.0-rc.1, which resolved to `npm publish --tag rc`.
@coderabbitai coderabbitai Bot added the review Waiting for review by colleagues label Aug 20, 2026
@jkasprzyk17
jkasprzyk17 dismissed stale reviews from coderabbitai[bot] and coderabbitai[bot] August 20, 2026 09:19

Stale: finding acknowledged as invalid; thread resolved.

@jkasprzyk17
jkasprzyk17 merged commit 61ff3d4 into main Aug 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review Waiting for review by colleagues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants