Skip to content

🔖 Add proper version tags #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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