Skip to content

Commit 465ca7e

Browse files
🔖 Add proper version tags (#11)
1 parent 4b89e0c commit 465ca7e

File tree

3 files changed

+25
-48
lines changed

3 files changed

+25
-48
lines changed

.github/workflows/pypi-publish.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,30 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.11'
16+
cache: 'pip'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install poetry
22+
23+
- name: Validate version
24+
id: validate_version
25+
run: |
26+
TAG_VERSION=${GITHUB_REF#refs/tags/v}
27+
PYPROJECT_VERSION=$(poetry version -s)
28+
echo "Tag version: $TAG_VERSION"
29+
echo "Pyproject version: $PYPROJECT_VERSION"
30+
if [ "$TAG_VERSION" != "$PYPROJECT_VERSION" ]; then
31+
echo "Error: Tag version ($TAG_VERSION) does not match pyproject.toml version ($PYPROJECT_VERSION)."
32+
exit 1
33+
fi
34+
1235
- name: Build and publish to pypi
1336
uses: JRubics/poetry-publish@v2.0
1437
with:

poetry.lock

Lines changed: 0 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fastapi-gcp-tasks"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "Trigger delayed Cloud Tasks from FastAPI"
55
readme = "README.md"
66
license = "MIT"

0 commit comments

Comments
 (0)