Bump Web Workflow
File: .github/workflows/bump-web.yml
Purpose
Automatically creates a release pull request when commits are pushed to services/web/**, with a bumped version number and auto-generated changelog.
How It Works
Automatic Trigger
Fires on push to main when any file in services/web/** changes.
Guard: Skips if the commit message contains release/web-v, which prevents re-triggering on the release PR merge commit back to main.
Manual Trigger
Invoke via workflow_dispatch with options:
- Bump:
patch(default),minor, ormajor
Steps
- Checkout repository with full commit history (
fetch-depth: 0) - Setup Node.js using the version specified in
services/web/package.json - Bump version in
services/web/package.jsonusingnpm version <type> - Outputs the new version for downstream steps
- Generate changelog using
git-cliff-action - Reads conventional commits matching
web-v*tag pattern inservices/web/** - Writes changelog to
services/web/CHANGELOG.md - Verify changelog is non-empty (exits with error if missing)
- Create release PR using
peter-evans/create-pull-request - Branch:
release/web-v<VERSION> - Title:
chore(release): web v<VERSION> - Body: Changelog contents
- Labels:
release - Adds modified files:
package.json,pnpm-lock.yaml,CHANGELOG.md - Ensure PR created - fails if PR creation was skipped (usually means PR already exists)
Outputs
| Output | Value |
|---|---|
new_version |
Bumped version string (e.g., 1.2.3) |
pull-request-number |
PR number (on successful creation) |
Concurrency
Uses concurrency group release-web with cancel-in-progress: false, ensuring only one bump-web workflow runs at a time.
Permissions Required
contents: write- Commit changes topackage.json,CHANGELOG.md,pnpm-lock.yamlpull-requests: write- Create release PR
Key Configuration
- Config file:
cliff.toml(project root, for changelog generation) - Version file:
services/web/package.json - Changelog output:
services/web/CHANGELOG.md - Lock file:
pnpm-lock.yaml(updated bynpm version) - Tag pattern:
web-v*(filters commits for this service's changelog) - Default bump:
patch(increments patch version on automatic trigger)
Next Steps
When this workflow creates a release PR:
- Review the changelog and version bump manually
- Merge the PR to
main(ensure thereleaselabel remains) - The
Create Release Tagworkflow automatically creates the Git tag - The
Publish Artifactsworkflow builds and publishes the Docker image