feat: add one-click release pipeline workflow#53
Conversation
- New release-pipeline.yml: merges dev→main, bumps version, pushes tag in a single workflow dispatch (replaces 13-step manual process) - Add sync-dev job to release.yml: auto-merges main→dev after publish - Skip heavy platform builds on version-bump PRs in build.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a one-click GitHub Actions release pipeline to automate dev→main merge, version bump, tagging, and post-release branch synchronization, while reducing unnecessary CI load on version-bump PRs.
Changes:
- Added a new workflow dispatch pipeline to merge dev→main, bump version, and push a release tag.
- Added a
sync-devjob to auto-merge main back into dev after a successful release. - Skipped macOS/Linux platform builds for
chore-bump-v*version-bump PR branches.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/release.yml | Adds a post-release job to sync main back into dev (or open a PR if conflicts). |
| .github/workflows/release-pipeline.yml | Introduces the one-click workflow to merge, bump version, and push a tag. |
| .github/workflows/build.yml | Skips expensive platform builds on version-bump PRs based on branch naming. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| CURRENT=$(python3 -c "import json; print(json.load(open('apps/desktop/src-tauri/tauri.conf.json'))['version'])") | ||
| NEW=$(python3 - <<'PY' | ||
| import os | ||
| cur = os.environ["CURRENT"] | ||
| rt = os.environ["RELEASE_TYPE"] | ||
| major, minor, patch = map(int, cur.split(".")) | ||
| if rt == "patch": | ||
| print(f"{major}.{minor}.{patch + 1}") | ||
| elif rt == "minor": | ||
| print(f"{major}.{minor + 1}.0") | ||
| elif rt == "major": | ||
| print(f"{major + 1}.0.0") | ||
| else: | ||
| raise SystemExit(1) | ||
| PY | ||
| ) | ||
| export CURRENT | ||
| echo "current=$CURRENT" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
In the version bump step, CURRENT is assigned but not exported before the Python snippet reads os.environ["CURRENT"]. This will raise a KeyError and fail the workflow. Export CURRENT (or inline it as an env var) before computing NEW.
| skip_ci_wait: | ||
| description: "Skip waiting for CI on main (use if dev CI already passed)" | ||
| type: boolean | ||
| default: true |
There was a problem hiding this comment.
The skip_ci_wait workflow input is defined but never used, so toggling it has no effect. Either implement the intended “wait for CI on main” behavior when skip_ci_wait is false, or remove the input to avoid misleading users.
| skip_ci_wait: | |
| description: "Skip waiting for CI on main (use if dev CI already passed)" | |
| type: boolean | |
| default: true |
| set -euo pipefail | ||
| git fetch origin main dev | ||
|
|
||
| # Check if dev branch exists | ||
| if ! git ls-remote --heads origin dev | grep -q .; then | ||
| echo "::notice::No dev branch found — skipping sync." | ||
| exit 0 |
There was a problem hiding this comment.
This step tries to handle the case where dev doesn't exist, but git fetch origin main dev will fail with a non-zero exit status if the remote dev branch is missing (due to set -euo pipefail). Fetch main first (or make the fetch of dev non-fatal) before checking for dev’s existence.
| else | ||
| echo "::warning::Auto-merge of main into dev failed (conflicts). Creating PR instead." | ||
| # Create a PR for manual resolution | ||
| BRANCH="chore/sync-main-to-dev-$(date +%Y%m%d)" |
There was a problem hiding this comment.
The fallback branch name only includes the date, so re-runs on the same day (or concurrent releases) can collide with an existing remote branch and make git push -u origin "$BRANCH" fail. Consider including github.run_id/github.run_number (or a timestamp with seconds) to ensure uniqueness.
| BRANCH="chore/sync-main-to-dev-$(date +%Y%m%d)" | |
| BRANCH="chore/sync-main-to-dev-$(date -u +%Y%m%d-%H%M%S)-${GITHUB_RUN_ID}" |
- Export CURRENT before Python subprocess reads it (was KeyError) - Remove unused skip_ci_wait input - Check dev branch existence before git fetch (avoids failure) - Add run ID to fallback branch name to prevent collisions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
release-pipeline.yml: one-click workflow dispatch that merges dev→main, bumps version, and pushes tag (triggeringrelease.yml)sync-devjob torelease.yml: auto-merges main back to dev after release completesbuild.ymlReplaces the 13-step manual release process with a single button click.
Test plan
🤖 Generated with Claude Code