Skip to content

Commit

Permalink
build: fix versioning of published package
Browse files Browse the repository at this point in the history
  • Loading branch information
truenicoco committed Jan 7, 2025
1 parent 915632c commit f5dfd04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
- name: Set version from tag or commit SHA
run: |
case ${{ github.ref }} in
"refs/tags/v*")
refs/tags/v*)
VERSION=$(echo ${{ github.ref_name }} | cut -c2-)
;;
*)
VERSION=0.0.0dev+git$(date +%Y%m%d-%H%M)-$(echo ${{ github.sha }} | cut -c1-8)
;;
esac
echo Package will be versioned as $VERSION
sed -i "s/NO_VERSION/$VERSION/" hh_creator/__init__.py
sed -i "s/0.0.0dev/$VERSION/" pyproject.toml
Expand Down

0 comments on commit f5dfd04

Please sign in to comment.