Skip to content

Commit

Permalink
🔖 Add proper version tags (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
rushilsrivastava authored May 30, 2024
1 parent 4b89e0c commit 465ca7e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 48 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4


- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Validate version
id: validate_version
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
PYPROJECT_VERSION=$(poetry version -s)
echo "Tag version: $TAG_VERSION"
echo "Pyproject version: $PYPROJECT_VERSION"
if [ "$TAG_VERSION" != "$PYPROJECT_VERSION" ]; then
echo "Error: Tag version ($TAG_VERSION) does not match pyproject.toml version ($PYPROJECT_VERSION)."
exit 1
fi
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
Expand Down
46 changes: 0 additions & 46 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fastapi-gcp-tasks"
version = "0.1.0"
version = "0.1.1"
description = "Trigger delayed Cloud Tasks from FastAPI"
readme = "README.md"
license = "MIT"
Expand Down

0 comments on commit 465ca7e

Please sign in to comment.