From 4a73a4cae0c9ec8cfba633212b6250991267bf2d Mon Sep 17 00:00:00 2001 From: Raimundo Henriques Date: Mon, 20 May 2024 17:02:55 +0100 Subject: [PATCH] feat: add workflow to allow for automatic opening of PR upon release --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..116e455 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Create Release Pull Request +on: + workflow_dispatch: + inputs: + version: + description: "Version" + required: true + +jobs: + create-pull-request: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Get date + id: date + run: echo "::set-output name=date::$(date +'%Y%m%d')" + + - name: Create Pull Request + env: + GH_TOKEN: ${{ github.token }} + run: gh pr create --title "Release v${{inputs.version}}" --body "Automated release of v${{inputs.version}}" --base main --head release-v${{ inputs.version }}-${{steps.date.outputs.date}}