From 71accc1c1edcce897f0d60900ca2d0b9d15f05c1 Mon Sep 17 00:00:00 2001 From: Matias Puerta Date: Thu, 31 Oct 2024 07:39:58 +0100 Subject: [PATCH] CHORE - Add workflow to create release PR automatically --- .../workflows/git-create-release-branch.yml | 33 +++++++++++++++++++ .version | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/git-create-release-branch.yml create mode 100644 .version diff --git a/.github/workflows/git-create-release-branch.yml b/.github/workflows/git-create-release-branch.yml new file mode 100644 index 00000000..26c98038 --- /dev/null +++ b/.github/workflows/git-create-release-branch.yml @@ -0,0 +1,33 @@ +name: Create Release Branch +run-name: Create Release Branch for ${{ inputs.release_branch_name }} +on: + workflow_dispatch: + inputs: + release_branch_name: + description: "Github Release Branch Name" + required: true +permissions: + contents: write + pull-requests: write + +jobs: + create-release-branch: + name: Create Release Branch ${{ inputs.release_branch_name }} + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + - name: Update application versions + run: | + sed -i "s/$(cat .version)/${{ inputs.release_branch_name}}/g" charts/deps/Chart.yaml charts/deps/values.yaml charts/openmetadata/Chart.yaml charts/openmetadata/README.md charts/openmetadata/templates/tests/test-connection.yaml .version + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + title: 'chore(release): Prepare ${{ inputs.release_branch_name }} release' + body: \ + - Update application versions to `${{ inputs.release_branch_name }}` + branch: ${{ inputs.release_branch_name }} + commit-message: 'chore(release): Prepare Branch for release ${{ inputs.release_branch_name }}' diff --git a/.version b/.version new file mode 100644 index 00000000..2b26b8d2 --- /dev/null +++ b/.version @@ -0,0 +1 @@ +1.5.9