mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
fix: fixed workflow again
This commit is contained in:
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user