Skip to content

Commit

Permalink
Safety check tag match version
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed May 7, 2024
1 parent 1636fa5 commit 9678d00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ jobs:
run: |
nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nix-cache
- name: Assert tag name matches version
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
version="$(poetry version --short)"
tag_name="${{ github.ref_name }}"
if [ "$version" != "$tag_name" ]; then
echo "Tag name mismatch: $version != $tag_name"
exit 1
fi
- name: Run tests
run: |
nix-shell --pure --run run-tests
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ license = "Unlicense"
name = "starlette-compress"
readme = "README.md"
repository = "https://github.com/Zaczero/starlette-compress"
version = "0.1.5.2"
version = "0.1.5.3"

[tool.poetry.dependencies]
brotli = {version = ">=1", markers = "platform_python_implementation == 'CPython'"}
Expand Down

0 comments on commit 9678d00

Please sign in to comment.