Skip to content

Commit

Permalink
chore: temporarily invert logic to test prereleases
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Mar 13, 2024
1 parent a797306 commit de92757
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1.5
if: ${{ contains(github.ref, '-rc') }}
if: ${{ !contains(github.ref, '-rc') }}
with:
repository_url: https://test.pypi.org/legacy/
print_hash: true
Expand All @@ -52,7 +52,7 @@ jobs:

- name: Parse version and output Test PyPI URL
id: test-version
if: ${{ contains(github.ref, '-rc') }}
if: ${{ !contains(github.ref, '-rc') }}
# run littlepay first, so `littlepay -v` doesn't create the config file (which outputs a message)
run: |
pip install -e .
Expand All @@ -64,13 +64,13 @@ jobs:
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1.5
# if: ${{ !contains(github.ref, '-rc') }}
# if: ${{ !!contains(github.ref, '-rc') }}
# with:
# print_hash: true

- name: Parse version and output PyPI URL
id: version
if: ${{ !contains(github.ref, '-rc') }}
if: ${{ !!contains(github.ref, '-rc') }}
# run littlepay first, so `littlepay -v` doesn't create the config file (which outputs a message)
run: |
pip install -e .
Expand All @@ -84,12 +84,12 @@ jobs:
# uses: softprops/action-gh-release@v2
env:
# this syntax is the only way to get ternary-operator behavior (see https://mattdood.com/2022/3/github-actions-conditional-environment-variables-20220325012837)
PYPI_RELEASE_URL: ${{ !contains(github.ref, '-rc') && steps.version.outputs.PYPI_RELEASE_URL || steps.test-version.outputs.PYPI_RELEASE_URL }}
PYPI_RELEASE_URL: ${{ !!contains(github.ref, '-rc') && steps.version.outputs.PYPI_RELEASE_URL || steps.test-version.outputs.PYPI_RELEASE_URL }}
# with:
# files: |
# ./dist/*.tar.gz
# ./dist/*.whl
# prerelease: ${{ contains(github.ref, '-rc') }}
# generate_release_notes: ${{ !contains(github.ref, '-rc') }}
# prerelease: ${{ !contains(github.ref, '-rc') }}
# generate_release_notes: ${{ !!contains(github.ref, '-rc') }}
# body: $PYPI_RELEASE_URL
run: echo $PYPI_RELEASE_URL

0 comments on commit de92757

Please sign in to comment.