From b7db7c6590b89208a690f76bdf4b386f232ff3a0 Mon Sep 17 00:00:00 2001 From: jorgechato Date: Tue, 12 Mar 2024 18:39:09 +0900 Subject: [PATCH] fix(ci/cd): release pipeline with fixed NEXT_RELEASE --- .github/workflows/release.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f5bd984..53573e6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ permissions: jobs: release: - if: ${{contains(github.head_ref, 'changelog') || github.event.label.name == 'pseudo-version' }} + if: ${{contains(github.head_ref, 'changelog') && github.event.pull_request.merged == true || github.event.label.name == 'pseudo-version' }} runs-on: ubuntu-latest steps: - name: Load secrets @@ -47,8 +47,9 @@ jobs: run: make plugin - name: Release - if: ${{contains(github.head_ref, 'changelog') && github.event.pull_request.merged == true}} - run: make release + if: ${{contains(github.head_ref, 'changelog')}} + run: | + NEXT_RELEASE=$(git describe --tags --abbrev=0 2>/dev/null || echo v0.0.0)) make release env: GH_TOKEN: ${{ steps.botanibit.outputs.token }}