Merge pull request #11 from creyD/dev

This commit is contained in:
2024-10-29 15:49:00 +01:00
committed by GitHub

View File

@@ -18,7 +18,6 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
if: github.ref_name != 'master'
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
@@ -35,7 +34,6 @@ jobs:
test:
runs-on: ubuntu-latest
needs: lint
if: github.ref_name != 'master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
@@ -47,7 +45,7 @@ jobs:
tag_and_publish:
runs-on: ubuntu-latest
if: github.ref == 'master' || github.ref == 'dev'
if: github.ref_name == 'master' || github.ref_name == 'dev'
needs: test
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
@@ -57,7 +55,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-tags: true
ref: ${{ github.ref }}
ref: ${{ github.ref_name }}
fetch-depth: 0
- name: setup git
@@ -68,7 +66,7 @@ jobs:
- name: set version format
id: version_format
run: |
if [[ ${{ github.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