Skip to content

Commit a733f7c

Browse files
committed
version replacement in CI
1 parent ac4fb60 commit a733f7c

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ jobs:
3636
run: |
3737
uv run pytest tests
3838
39+
- name: Version replacement based on tag ↔️
40+
if: github.ref_type == 'tag'
41+
run: |
42+
TAG_VERSION=${GITHUB_REF#refs/tags/}
43+
echo "Tag version: $TAG_VERSION"
44+
sed -i "s/0.0.0/$TAG_VERSION/" pyproject.toml
45+
uv version
46+
3947
- name: Build and publish 🚀
4048
env:
4149
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/deploy_to_test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ jobs:
3636
run: |
3737
uv run pytest tests
3838
39+
- name: Version replacement based on tag ↔️
40+
if: github.ref_type == 'tag'
41+
run: |
42+
TAG_VERSION=${GITHUB_REF#refs/tags/}
43+
echo "Tag version: $TAG_VERSION"
44+
sed -i "s/0.0.0/$TAG_VERSION/" pyproject.toml
45+
uv version
46+
3947
- name: Build and publish 🚀
4048
env:
4149
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD_TEST }}

.github/workflows/push_dev.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on: [ push ]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98
strategy:
109
matrix:
@@ -36,3 +35,11 @@ jobs:
3635
- name: Test with pytest ✅
3736
run: |
3837
uv run pytest tests
38+
39+
- name: Version replacement based on tag ↔️
40+
if: github.ref_type == 'tag'
41+
run: |
42+
TAG_VERSION=${GITHUB_REF#refs/tags/}
43+
echo "Tag version: $TAG_VERSION"
44+
sed -i "s/0.0.0/$TAG_VERSION/" pyproject.toml
45+
uv version

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "keboola.http-client"
3-
version = "1.1.5"
3+
version = "0.0.0" # replaced by actual version based on release tag in github actions
44
dependencies = [
55
"aiolimiter>=1.2.1",
66
"httpx>=0.28.1",

0 commit comments

Comments
 (0)