Skip to content

Commit

Permalink
ci: fix github release step
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Dec 18, 2024
1 parent d4b429a commit 5d6e697
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,13 @@ jobs:
fetch-depth: 0

- name: Check if the commit has a vx.y.z tag
id: check-version
run: |
if git tag --list --points-at ${{ github.sha }} | grep -q -E '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "is new version"
echo "should_continue=true" >> "$GITHUB_OUTPUT"
else
echo "is not a new version"
echo "should_continue=false" >> "$GITHUB_OUTPUT"
fi
Expand All @@ -125,9 +128,11 @@ jobs:
run: hatch build

- name: Publish package distributions to PyPI
if: ${{ steps.check-version.outputs.should_continue == true }}
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3

- name: create github release
if: ${{ steps.check-version.outputs.should_continue == true }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: scriv github-release

0 comments on commit 5d6e697

Please sign in to comment.