From 8a3a60dbb0cb6b04f0ddafbe82c7b309ee8692ef Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 29 Oct 2024 15:30:42 +0100 Subject: [PATCH] fix: fixed workflow again --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f50bba..1f32c80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ on: - "**/CHANGELOG.md" pull_request: branches: - - master - dev workflow_dispatch: @@ -48,7 +47,7 @@ jobs: tag_and_publish: runs-on: ubuntu-latest - if: github.ref_name == 'dev' || github.ref_name == 'master' + if: github.ref == 'master' || github.ref == 'dev' needs: test permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing @@ -58,7 +57,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-tags: true - ref: ${{ github.ref_name }} + ref: ${{ github.ref }} fetch-depth: 0 - name: setup git @@ -69,7 +68,7 @@ jobs: - name: set version format id: version_format run: | - if [[ ${{ github.ref_name }} == 'master' ]]; then + if [[ ${{ github.ref }} == 'master' ]]; then echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT else echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT @@ -86,13 +85,12 @@ jobs: version_format: ${{ steps.version_format.outputs.version_format }} - name: Create & Push Tag - if: github.ref_name == 'master' || github.ref_name == 'dev' run: | git tag ${{ steps.git_version.outputs.version }} git push origin ${{ steps.git_version.outputs.version }} - name: Sync tag to dev branch - if: github.ref_name == 'master' + if: github.ref == 'master' run: | git fetch origin dev git checkout dev