Skip to content

Commit 13259ba

Browse files
committed
fix: ci-cd pipelines
1 parent 5310c4a commit 13259ba

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

.github/workflows/ci-cd.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
with:
2020
python-version: '3.13'
2121

22+
- name: Install Pre-commit
23+
run: |
24+
pip install pre-commit
25+
pre-commit run --all-files
26+
2227
- name: Install uv
2328
run: |
2429
pip install uv
@@ -32,7 +37,7 @@ jobs:
3237
run: |
3338
echo "NOT AVAILABLE YET"
3439
35-
release:
40+
pypi-deploy:
3641
needs: build
3742
runs-on: ubuntu-latest
3843
if: github.ref == 'refs/heads/main'
@@ -45,11 +50,6 @@ jobs:
4550
toml get --toml-path pyproject.toml project.version > VERSION
4651
echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
4752
48-
- name: Create Git tag
49-
run: |
50-
git tag v${{ env.VERSION }}
51-
git push origin v${{ env.VERSION }}
52-
5353
- name: Install uv
5454
run: |
5555
pip install uv
@@ -60,7 +60,6 @@ jobs:
6060
uv build
6161
uv publish --token ${{ secrets.PYPI_API_TOKEN }}
6262
63-
6463
docker-deploy:
6564
needs: build
6665
runs-on: ubuntu-latest
@@ -93,3 +92,31 @@ jobs:
9392
- name: Clean up
9493
run: |
9594
docker compose down
95+
96+
release:
97+
needs: [pypi-deploy, docker-deploy]
98+
if: github.ref == 'refs/heads/main'
99+
runs-on: ubuntu-latest
100+
steps:
101+
- name: Checkout code
102+
uses: actions/checkout@v4
103+
104+
- name: Get version
105+
run: |
106+
pip install toml-cli
107+
toml get --toml-path pyproject.toml project.version > VERSION
108+
echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
109+
110+
- name: Create Git tag
111+
run: |
112+
git tag v${{ env.VERSION }}
113+
git push origin v${{ env.VERSION }}
114+
115+
- name: Create Release
116+
uses: softprops/action-gh-release@v2
117+
with:
118+
tag_name: v${{ env.VERSION }}
119+
name: Release v${{ env.VERSION }}
120+
draft: false
121+
prerelease: false
122+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)