From 0efaa912267e43886e775199de6386a07180bc79 Mon Sep 17 00:00:00 2001 From: Kevin Maes Date: Fri, 19 Dec 2025 15:00:45 +0200 Subject: [PATCH] feat: auto-trigger promote-to-main on Version Packages merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename release-to-main.yml to promote-to-main.yml (matches maze repo) and add automatic trigger when Version Packages PR is merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .changeset/promote-to-main-auto-trigger.md | 5 +++ .github/workflows/promote-to-main.yml | 46 ++++++++++++++++++++++ .github/workflows/release-to-main.yml | 31 --------------- 3 files changed, 51 insertions(+), 31 deletions(-) create mode 100644 .changeset/promote-to-main-auto-trigger.md create mode 100644 .github/workflows/promote-to-main.yml delete mode 100644 .github/workflows/release-to-main.yml diff --git a/.changeset/promote-to-main-auto-trigger.md b/.changeset/promote-to-main-auto-trigger.md new file mode 100644 index 00000000..ae5445f3 --- /dev/null +++ b/.changeset/promote-to-main-auto-trigger.md @@ -0,0 +1,5 @@ +--- +"eggdrop": patch +--- + +Rename release-to-main to promote-to-main and add automatic trigger on Version Packages PR merge diff --git a/.github/workflows/promote-to-main.yml b/.github/workflows/promote-to-main.yml new file mode 100644 index 00000000..3b7842a6 --- /dev/null +++ b/.github/workflows/promote-to-main.yml @@ -0,0 +1,46 @@ +# Automatically merges dev into main after a "Version Packages" PR is merged +# This completes the release process - Vercel will auto-deploy main to production +name: Promote to Main + +on: + pull_request: + types: [closed] + branches: [dev] + # Keep manual trigger as backup + workflow_dispatch: + +jobs: + promote: + name: Merge dev to main + runs-on: ubuntu-latest + # Only run if PR was merged (not just closed) AND is a Version Packages PR + # For workflow_dispatch, always run + if: > + github.event_name == 'workflow_dispatch' || + (github.event.pull_request.merged == true && + contains(github.event.pull_request.title, 'Version Packages')) + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Merge dev into main + run: | + git checkout main + git pull origin main + git merge origin/dev --no-edit + git push origin main + + - name: Summary + run: | + echo "✅ Successfully merged dev into main" + echo "🚀 Vercel will now deploy to production" diff --git a/.github/workflows/release-to-main.yml b/.github/workflows/release-to-main.yml deleted file mode 100644 index f286455f..00000000 --- a/.github/workflows/release-to-main.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Release to Main - -on: - workflow_dispatch: - -jobs: - release-to-main: - name: Push release to main - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - ref: dev - fetch-depth: 0 - - - name: Setup git user - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: Create release commit - run: | - git commit -m 'Release to main' --allow-empty - - - name: Force push the release to main - run: | - git push origin HEAD:main --force