Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
Re-export published git tag name (including `v` prefix) in `get_version` step. This ensures that the tag/title of the GitHub release created in a later step matches the git tag.
  • Loading branch information
JostMigenda authored Dec 4, 2024
1 parent 1ad71b8 commit a6f849d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
pip install .
PYTHON_VERSION=`python -c 'import snewpy; print(snewpy.__version__)'`
echo "PYTHON_VERSION=${PYTHON_VERSION}"
GIT_VERSION=${GITHUB_REF/refs\/tags\/v/}
GIT_VERSION=${GITHUB_REF/refs\/tags\//}
echo "GIT_VERSION=${GIT_VERSION}"
if [ $PYTHON_VERSION != $GIT_VERSION ]; then exit 1; fi
echo "VERSION=${PYTHON_VERSION}" >> $GITHUB_OUTPUT
if [ v$PYTHON_VERSION != $GIT_VERSION ]; then exit 1; fi
echo "VERSION=${GIT_VERSION}" >> $GITHUB_OUTPUT
- name: Build and publish
env:
Expand Down

0 comments on commit a6f849d

Please sign in to comment.