Skip to content
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

fix: pypi publish running unconditionally #1182

Merged
merged 1 commit into from
Jun 7, 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
8 changes: 2 additions & 6 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ jobs:
dist/*.whl

- name: Publish to test instance of PyPI (dry-run)
if: |
${{ github.event_name == 'push' && github.ref_type == 'branch' }} ||
${{ github.event_name == 'workflow_dispatch' && github.ref_type == 'branch'}}
if: ${{ (github.event_name == 'push' && github.ref_type == 'branch') || (github.event_name == 'workflow_dispatch' && github.ref_type == 'branch' ) }}
run: |
echo "Doing a dry-run publish to test-pypi..."
echo "Based on the following workflow variables, this is not a hugr-py version tag push:"
Expand All @@ -68,9 +66,7 @@ jobs:
poetry publish -r test-pypi --dist-dir ../dist --skip-existing --dry-run

- name: Publish to PyPI
if: |
${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, format('refs/tags/{0}-v', matrix.package)))}} ||
${{ (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, format('refs/tags/{0}-v', matrix.package)))}} ||
if: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, format('refs/tags/{0}-v', matrix.package)) ) || (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, format('refs/tags/{0}-v', matrix.package)) ) }}
run: |
cd ${{ matrix.package }}
poetry config pypi-token.pypi ${{ secrets.PYPI_PUBLISH }}
Expand Down