mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-14 20:30:31 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb64874c47 | |||
| b7200852a4 | |||
| 3d18205205 | |||
| 6806de23b3 | |||
| 6a93ab05a3 |
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -19,6 +19,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref_name != 'master'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: psf/black@stable
|
- uses: psf/black@stable
|
||||||
@@ -35,6 +36,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint
|
needs: lint
|
||||||
|
if: github.ref_name != 'master'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
@@ -46,7 +48,7 @@ jobs:
|
|||||||
|
|
||||||
tag_and_publish:
|
tag_and_publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.head_ref == 'master' || github.head_ref == 'dev'
|
if: github.ref_name == 'dev' || github.ref_name == 'master'
|
||||||
needs: test
|
needs: test
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
||||||
@@ -56,7 +58,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.ref_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: setup git
|
- name: setup git
|
||||||
@@ -67,7 +69,7 @@ jobs:
|
|||||||
- name: set version format
|
- name: set version format
|
||||||
id: version_format
|
id: version_format
|
||||||
run: |
|
run: |
|
||||||
if [[ ${{ github.head_ref }} == 'master' ]]; then
|
if [[ ${{ github.ref_name }} == 'master' ]]; then
|
||||||
echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT
|
echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT
|
echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT
|
||||||
@@ -84,7 +86,7 @@ jobs:
|
|||||||
version_format: ${{ steps.version_format.outputs.version_format }}
|
version_format: ${{ steps.version_format.outputs.version_format }}
|
||||||
|
|
||||||
- name: Create & Push Tag
|
- name: Create & Push Tag
|
||||||
if: github.head_ref == 'master' || github.head_ref == 'dev'
|
if: github.ref_name == 'master' || github.ref_name == 'dev'
|
||||||
run: |
|
run: |
|
||||||
git tag ${{ steps.git_version.outputs.version }}
|
git tag ${{ steps.git_version.outputs.version }}
|
||||||
git push origin ${{ steps.git_version.outputs.version }}
|
git push origin ${{ steps.git_version.outputs.version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user