Skip to content

Commit

Permalink
ci: 🎡 refactor wheel build versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Mar 9, 2024
1 parent 451d373 commit a7f19b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,15 @@ jobs:
run: |
pdm install -G build -G release --no-self --no-lock -v
- name: Increment version
- name: Increment version if releasing
id: semantic-version
run: |
pdm run semantic-release --noop -v version --patch --no-commit
version=$(pdm run semantic-release version --patch --no-commit 2>/dev/null)
echo "version=$version" >> "$GITHUB_OUTPUT"
current_version=$(grep '^version =' pyproject.toml | head -1 | cut -d '"' -f 2)
next_version=$(pdm run semantic-release version --patch --print 2>/dev/null)
echo "version=$next_version" >> "$GITHUB_OUTPUT"
if [ $next_version != $current_version ]; then
pdm run semantic-release version --patch --skip-build --no-commit --no-tag --no-vcs-release --no-changelog
fi
- name: Setup macOS environment
if: contains(matrix.os, 'macos')
Expand Down
2 changes: 1 addition & 1 deletion pdm.lock

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

0 comments on commit a7f19b8

Please sign in to comment.