Skip to content

feat: add one-click release pipeline workflow#53

Merged
MaxMB15 merged 2 commits intomainfrom
chore/release-pipeline-workflow
Apr 5, 2026
Merged

feat: add one-click release pipeline workflow#53
MaxMB15 merged 2 commits intomainfrom
chore/release-pipeline-workflow

Conversation

@MaxMB15
Copy link
Copy Markdown
Owner

@MaxMB15 MaxMB15 commented Apr 5, 2026

Summary

  • New release-pipeline.yml: one-click workflow dispatch that merges dev→main, bumps version, and pushes tag (triggering release.yml)
  • Added sync-dev job to release.yml: auto-merges main back to dev after release completes
  • Skip heavy platform builds on version-bump PRs in build.yml

Replaces the 13-step manual release process with a single button click.

Test plan

  • Merge this PR to main
  • Run "Release — one-click pipeline" with dry_run=true to verify the workflow logic
  • Run a real patch release to test end-to-end

🤖 Generated with Claude Code

- 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>
Copilot AI review requested due to automatic review settings April 5, 2026 22:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-dev job 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.

Comment on lines +131 to +148
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"
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release-pipeline.yml Outdated
Comment on lines +31 to +34
skip_ci_wait:
description: "Skip waiting for CI on main (use if dev CI already passed)"
type: boolean
default: true
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
skip_ci_wait:
description: "Skip waiting for CI on main (use if dev CI already passed)"
type: boolean
default: true

Copilot uses AI. Check for mistakes.
Comment on lines +435 to +441
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
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
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)"
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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}"

Copilot uses AI. Check for mistakes.
- 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>
@MaxMB15 MaxMB15 merged commit 7502d3e into main Apr 5, 2026
5 checks passed
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.

2 participants