Skip to content

Retrieve correct tag in test pypi action #1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/publish-to-pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools wheel twine build
pip install .
- name: Get the tag version
id: get-version
run: |
echo ${GITHUB_REF#refs/tags/}
echo "TAG::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Test version/tag correspondence
id: version-check
run: |
neo_version=$(python -c "import neo; print(neo.__version__)")
if [[ ${{ github.event.release.tag_name }} == $neo_version ]]; then
tag_version=${{ steps.get-version.outputs.TAG }}
echo $neo_version
echo $tag_version
if [[ $tag_version == $neo_version ]]; then
echo "VERSION_TAG_MATCH=true" >> $GITHUB_OUTPUT
echo "Version matches tag, proceeding with release to Test PyPI"
else
Expand Down