Skip to content

ci(gha): automate semantic release flow for Docker app#206

Merged
pranishnepal merged 1 commit into
masterfrom
WAL-1486
May 22, 2026
Merged

ci(gha): automate semantic release flow for Docker app#206
pranishnepal merged 1 commit into
masterfrom
WAL-1486

Conversation

@pranishnepal
Copy link
Copy Markdown
Contributor

@pranishnepal pranishnepal commented May 22, 2026

Problem

Currently, releases required a manual package.json version bump commit to trigger the workflow. This was error-prone and relied on a fragile diff-detection heuristic.

What

Going forward, merging a feat: or fix: commit to master automatically triggers semantic-release, which determines the next version from commit history, creates a git tag (e.g. v3.1.0) and GitHub Release, then gates the Trivy scan and Docker build on the release output. chore, test, ci commits produce no release.

The versioning in package.json says static. We do something similar in api-ts.

Notes

  • v3.0.0 tag already exists on master and will serve as the baseline for semantic-release on first run.
  • release-to-ghcr.yaml: replaced get-context + create-release jobs with a single semantic-release step; added concurrency group to prevent overlapping releases.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 22, 2026

WAL-1486

@pranishnepal pranishnepal marked this pull request as ready for review May 22, 2026 14:25
@pranishnepal pranishnepal requested a review from a team as a code owner May 22, 2026 14:25
@pranishnepal pranishnepal requested a review from bdesoky May 22, 2026 14:25
louib
louib previously approved these changes May 22, 2026
Previously, releases required a manual package.json version bump commit
to trigger the workflow. This was error-prone and relied on a fragile
diff-detection heuristic.

Going forward, releases are triggered manually via workflow_dispatch in
GitHub Actions. When run, semantic-release reads all commits since the
last tag, determines the next version (feat: → minor, fix: → patch,
feat!: → major), creates a git tag and GitHub Release with generated
notes, then runs a Trivy security scan and pushes the Docker image to
GHCR. chore:/test:/ci: commits never trigger a release. PRs can merge
to master freely without cutting a release.

Changes:
- package.json version set to "0.0.0-semantically-released" placeholder;
  git tags are now the authoritative version source
- .releaserc.json: add @semantic-release/github plugin to create git tags
  and GitHub Releases natively
- release-to-ghcr.yaml: replace get-context + create-release jobs with a
  single semantic-release step; trigger changed to workflow_dispatch;
  add concurrency group to prevent overlapping releases

Note: v3.0.0 tag already exists on master and will serve as the baseline
for semantic-release on first run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
push:
branches:
- master
workflow_dispatch:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed so that the new version is released on workflow start, as opposed to master merge

Copy link
Copy Markdown
Contributor

@pranavjain97 pranavjain97 left a comment

Choose a reason for hiding this comment

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

overall lgtm, just a bit concerned about confusing clients on the image release versioning with this change so it should be clarified somewhere in the changelogs / dev-docs

Comment thread package-lock.json
{
"name": "@bitgo/advanced-wallets",
"version": "3.0.0",
"version": "0.0.0-semantically-released",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

once we do a new release via GH, what will the release tag and image numbering look like? It could be a bit confusing since the last image release was 3.0.0

Copy link
Copy Markdown
Contributor Author

@pranishnepal pranishnepal May 22, 2026

Choose a reason for hiding this comment

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

it should be 3.0.1 (if it's a feat), tag 3.0.0 already exists. This version here will stay constant

@pranishnepal pranishnepal requested a review from pranavjain97 May 22, 2026 19:21
@pranishnepal pranishnepal merged commit 46c5637 into master May 22, 2026
20 checks passed
@pranishnepal pranishnepal deleted the WAL-1486 branch May 22, 2026 20:22
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.

3 participants