Skip to content

Commit

Permalink
fix: fixed workflow again
Browse files Browse the repository at this point in the history
  • Loading branch information
creyD committed Oct 29, 2024
1 parent a6ded91 commit 8a3a60d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- "**/CHANGELOG.md"
pull_request:
branches:
- master
- dev
workflow_dispatch:

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8a3a60d

Please sign in to comment.