From af2b33559d98ff7cda48ef6b6973229ad78742de Mon Sep 17 00:00:00 2001 From: pomo Date: Fri, 12 Apr 2024 14:57:08 +0200 Subject: [PATCH] fix: prettify ci workflow --- .github/workflows/bump_version.yaml | 9 ++++----- .github/workflows/trigger_release.yaml | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/trigger_release.yaml diff --git a/.github/workflows/bump_version.yaml b/.github/workflows/bump_version.yaml index 596af39..0479a49 100644 --- a/.github/workflows/bump_version.yaml +++ b/.github/workflows/bump_version.yaml @@ -1,22 +1,21 @@ on: - pull_request: + push: branches: - - main - types: [closed] + - release name: Bump version and create changelog jobs: bump_version: - if: ${{ github.event.pull_request.merged }} runs-on: ubuntu-latest name: "Bump version and create changelog with commitizen" steps: - name: Check out - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" + ref: main - id: cz name: Create bump and changelog uses: commitizen-tools/commitizen-action@master diff --git a/.github/workflows/trigger_release.yaml b/.github/workflows/trigger_release.yaml new file mode 100644 index 0000000..7ab9521 --- /dev/null +++ b/.github/workflows/trigger_release.yaml @@ -0,0 +1,21 @@ +name: Merge master into release branch to trigger release + +on: + pull_request: + types: + - closed + +jobs: + sync-branch: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Merge development -> staging + uses: devmasx/merge-branch@master + with: + type: now + from_branch: main + target_branch: release + github_token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"