From abdafd67ff886b597eec40b6d6b46aec55727a85 Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Thu, 27 Oct 2022 10:29:47 +0200 Subject: [PATCH] chore: allow to cut releases from branches Change-Id: If2c5403fa9d513bf4e98396be24600f65d4c8c28 Signed-off-by: Florent Benoit --- .github/workflows/release.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 61a2c5b4575..a3b0550bd29 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,6 +23,10 @@ on: version: description: 'Version to release' required: true + branch: + description: 'Branch to use for the release' + required: true + default: main env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} DEBUG: electron-builder @@ -39,6 +43,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.branch }} - name: Generate tag utilities id: TAG_UTIL run: | @@ -86,7 +92,8 @@ jobs: release_name: ${{ steps.TAG_UTIL.outputs.githubTag }} draft: true prerelease: false - - name: Create the PR to bump the version in the main branch + - name: Create the PR to bump the version in the main branch (only if we're tagging from main branch) + if: ${{ github.event.inputs.branch == 'main' }} run: | git config --local user.name ${{ github.actor }} git config --local user.email "fbenoit@redhat.com" @@ -108,7 +115,7 @@ jobs: echo "🔅 Mark the PR as being ok to be merged automatically" gh pr merge "${pullRequestUrl}" --auto --rebase env: - GITHUB_TOKEN: ${{ secrets.PODMAN_DESKTOP_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PODMAN_DESKTOP_BOT_TOKEN }} build: name: Build / ${{ matrix.os }}