From f8960248b4001e41f442b198efaa1dd6ab9e1486 Mon Sep 17 00:00:00 2001 From: Chase Redmon Date: Sat, 7 Feb 2026 03:11:09 -0500 Subject: [PATCH] =?UTF-8?q?Add=20workflow=20to=20auto-create=20dev=20?= =?UTF-8?q?=E2=86=92=20release=20PR=20on=20new=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatically opens a PR from dev to release whenever new commits are pushed to dev. Skips if an open PR already exists. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/auto-release-pr.yml | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/auto-release-pr.yml diff --git a/.github/workflows/auto-release-pr.yml b/.github/workflows/auto-release-pr.yml new file mode 100644 index 0000000..f2f6946 --- /dev/null +++ b/.github/workflows/auto-release-pr.yml @@ -0,0 +1,37 @@ +name: Auto release PR + +on: + push: + branches: [dev] + +permissions: + contents: read + pull-requests: write + +jobs: + open-release-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Check for existing PR + id: check + run: | + pr=$(gh pr list --base release --head dev --state open --json number --jq '.[0].number') + echo "existing_pr=$pr" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create PR if none exists + if: steps.check.outputs.existing_pr == '' + run: | + gh pr create \ + --base release \ + --head dev \ + --title "Release: merge dev into release" \ + --body "Automated PR to merge dev changes into release." + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}