Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed github pipeline #8

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

tag_and_publish:
runs-on: ubuntu-latest
if: github.head_ref == 'master' || github.head_ref == 'dev'
if: github.ref_name == 'dev' || github.ref_name == 'master' && github.event_name == 'push'
needs: test
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
Expand All @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-tags: true
ref: ${{ github.head_ref }}
ref: ${{ github.ref_name }}
fetch-depth: 0

- name: setup git
Expand All @@ -67,7 +67,7 @@ jobs:
- name: set version format
id: version_format
run: |
if [[ ${{ github.head_ref }} == 'master' ]]; then
if [[ ${{ github.ref_name }} == 'master' ]]; then
echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT
else
echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT
Expand All @@ -84,7 +84,7 @@ jobs:
version_format: ${{ steps.version_format.outputs.version_format }}

- name: Create & Push Tag
if: github.head_ref == 'master' || github.head_ref == 'dev'
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 }}
Expand Down