Skip to content

Commit

Permalink
Add check for versioning in CI
Browse files Browse the repository at this point in the history
version 0.0.4
  • Loading branch information
hamishs committed May 31, 2024
1 parent 4a19ff9 commit 86048f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ permissions:
contents: read

jobs:

check-version:
name: Check Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check version
run: |
RELEASE="${{github.event.release.tag_name}}"
RELEASE="${RELEASE:1}"
VERSION=$(sed -nr 's/version = "([0-9\.]*)"/\1/p' pyproject.toml)
if [ "$RELEASE"=="$VERSION" ]; then
echo "Version in toml $VERSION does not match tag $RELEASE"
exit 1
else
echo "Version in pyproject.toml matches the latest tag."
fi
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module-name = "drisk_api"
[project]
name = "drisk_api"
description="drisk_api - API to connect to dRISK Edge."
version = "0.0.3"
version = "0.0.4"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Rust",
Expand Down

0 comments on commit 86048f6

Please sign in to comment.