Skip to content

chore: automate release process with release-please#269

Open
fan-zhang-sv wants to merge 5 commits intomasterfrom
chore/automate-releases
Open

chore: automate release process with release-please#269
fan-zhang-sv wants to merge 5 commits intomasterfrom
chore/automate-releases

Conversation

@fan-zhang-sv
Copy link
Copy Markdown
Collaborator

Summary

Replace the current manual 3-step release process with release-please automation, reducing it to a single step: merge the auto-generated Release PR.

Before (3 manual steps)

  1. Merge a PR to bump the version number in package.json
  2. Go to GitHub Actions and manually trigger the release workflow with the new version
  3. Go to GitHub Releases and manually write release notes

After (1 step)

  1. Merge the release-please PR when you're ready to release

Everything else — version bump, changelog, npm publish, git tag, GitHub Release — happens automatically.

Changes

New files

  • release-please-config.json — Configures release-please for @base-org/account and @base-org/account-ui as separate packages with path-scoped changelogs (include-paths ensures commits only appear in the relevant package's changelog)
  • .release-please-manifest.json — Seeds current versions (account 2.5.3, account-ui 1.0.1) so release-please knows where to start
  • .github/workflows/release-please.yml — Main automation workflow:
    • On every push to master, release-please creates/updates a Release PR per package with version bump + CHANGELOG.md
    • Version is auto-determined from Conventional Commits: fix: → patch, feat: → minor, feat!:/BREAKING CHANGE → major
    • When a Release PR is merged, conditional publish jobs run (publish-account and publish-account-ui) with the same build/publish steps as the existing workflows
  • .github/workflows/pr-title.yml — Enforces Conventional Commits format on PR titles (required since squash merges use the PR title as the commit message, and release-please depends on this)

Modified files

  • .github/workflows/release-account-canary.yml — Version input is now optional. When left empty, it auto-detects the next version from the pending release-please PR (via gh pr list --label "autorelease: pending"). Manual override is still supported.
  • CONTRIBUTING.md — Added a "Releasing" section documenting the stable and canary release process, and added PR title format examples under Git Commit Messages

Deprecated files (kept as fallback)

  • release-account.ymlrelease-account-manual.yml — Renamed with [DEPRECATED] prefix. Still functional as a fallback if release-please fails. To be removed after the first successful automated release.
  • release-ui.ymlrelease-ui-manual.yml — Same treatment.

How it works

Push to master → release-please creates/updates Release PR
                        ↓
              Maintainer merges Release PR
                        ↓
        npm publish + git tag + GitHub Release
  • @base-org/account and @base-org/account-ui have separate Release PRs and can be released independently
  • Canary releases remain manual via workflow_dispatch, but no longer require version input
  • The version in package.json on master is always correct after merging the Release PR (no follow-up PR needed)

Post-merge action required

Add PR Title / lint as a required status check in the repo's branch protection settings for master to enforce Conventional Commits as a hard gate.

Test plan

  • Verify release-please workflow runs on push to master and creates a Release PR
  • Verify PR title linting rejects non-conventional titles (e.g., "update stuff") and accepts valid ones (e.g., "feat: add feature")
  • Verify canary workflow auto-detects version from pending Release PR when input is left empty
  • Verify canary workflow accepts manual version override
  • Verify deprecated manual workflows still appear in Actions UI and are functional as fallback
  • After first successful automated release, remove deprecated release-account-manual.yml and release-ui-manual.yml

Made with Cursor

Replace the manual 3-step release process (version bump PR, trigger
workflow, write release notes) with release-please automation that
reduces it to a single step: merge the auto-generated Release PR.

Made-with: Cursor
@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Apr 8, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

stephancill
stephancill previously approved these changes Apr 8, 2026
Comment on lines +97 to +118
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. This helps us generate changelogs and follow a standard format.

PR titles are validated against this format in CI. A valid PR title looks like:

- `feat: add wallet connection support`
- `fix: resolve session timeout issue`
- `feat!: redesign payment API` (breaking change)
- `chore: update dependencies`

## Releasing

Releases are automated using [release-please](https://github.com/googleapis/release-please). The process is driven by [Conventional Commits](#git-commit-messages).

### How it works

1. When PRs with `feat:`, `fix:`, or breaking change commits are merged to `master`, release-please automatically opens (or updates) a **Release PR** for each affected package.
2. The Release PR contains the version bump in `package.json` and an updated `CHANGELOG.md`.
3. The version is determined automatically from commit types:
- `fix:` -> patch (e.g., 2.5.3 -> 2.5.4)
- `feat:` -> minor (e.g., 2.5.3 -> 2.6.0)
- `feat!:` or `BREAKING CHANGE:` footer -> major (e.g., 2.5.3 -> 3.0.0)
4. When you're ready to release, **merge the Release PR**. This triggers npm publish, git tag creation, and a GitHub Release automatically.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we add this to an AGENTS.md in repo root pls

- Add agent guideline files for Cursor and Claude Code with repo-specific
  conventions (Yarn 4, Preact, path aliases, generated files, etc.)
- Align account-ui publish job to use OIDC auth instead of NPM_TOKEN,
  matching the account-sdk publish pattern

Made-with: Cursor
Single source of truth for agent guidelines.

Made-with: Cursor
Match the pattern in release-please.yml: use OIDC via id-token instead
of explicit NPM_TOKEN, and add npm update step.

Made-with: Cursor
Consistent with all other publish workflows.

Made-with: Cursor
Copy link
Copy Markdown
Collaborator

@cb-jake cb-jake left a comment

Choose a reason for hiding this comment

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

Curious why we dont need an NPM token to publish anymore. Unless I missed something in the release-please workflow

Comment on lines -41 to -43
- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm curious why we don't need this anymore?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the secret is already in the environment set above at line 14 environment: publish.

i just found out the old release-account didn't have to set the npm token for release and it still works, so i removed this extra step in all workflow

Comment on lines 49 to 51
run: |
cd packages/account-sdk
npm publish --tag latest --access public
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

cc: @cb-heimdall on the old release account

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