File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -242,12 +242,15 @@ jobs:
242
242
run : |
243
243
pdm install -G build -G release --no-self --no-lock -v
244
244
245
- - name : Increment version
245
+ - name : Increment version if releasing
246
246
id : semantic-version
247
247
run : |
248
- pdm run semantic-release --noop -v version --patch --no-commit
249
- version=$(pdm run semantic-release version --patch --no-commit 2>/dev/null)
250
- echo "version=$version" >> "$GITHUB_OUTPUT"
248
+ current_version=$(grep '^version =' pyproject.toml | head -1 | cut -d '"' -f 2)
249
+ next_version=$(pdm run semantic-release version --patch --print 2>/dev/null)
250
+ echo "version=$next_version" >> "$GITHUB_OUTPUT"
251
+ if [ $next_version != $current_version ]; then
252
+ pdm run semantic-release version --patch --skip-build --no-commit --no-tag --no-vcs-release --no-changelog
253
+ fi
251
254
252
255
- name : Setup macOS environment
253
256
if : contains(matrix.os, 'macos')
You can’t perform that action at this time.
0 commit comments