Skip to content

Commit

Permalink
Merge pull request #483 from reef-technologies/cd_improv
Browse files Browse the repository at this point in the history
add prerelease support in CD
  • Loading branch information
mjurbanski-reef committed Mar 22, 2024
2 parents 68d6387 + 7067616 commit ea8626b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
B2_PYPI_PASSWORD: ${{ secrets.B2_PYPI_PASSWORD }}
runs-on: ubuntu-latest
steps:
- name: Determine if pre-release
id: prerelease_check
run: |
export IS_PRERELEASE=$([[ ${{ github.ref }} =~ [^0-9]$ ]] && echo true || echo false)
echo "prerelease=$IS_PRERELEASE" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -40,11 +45,11 @@ jobs:
name: ${{ steps.build.outputs.version }}
body: ${{ steps.read-changelog.outputs.changes }}
draft: ${{ env.ACTIONS_STEP_DEBUG == 'true' }}
prerelease: false
prerelease: ${{ steps.prerelease_check.outputs.prerelease }}
files: ${{ steps.build.outputs.asset_path }}
- name: Upload the distribution to PyPI
if: ${{ env.B2_PYPI_PASSWORD != '' }}
if: ${{ env.B2_PYPI_PASSWORD != '' && steps.prerelease_check.outputs.prerelease == 'false' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ env.B2_PYPI_PASSWORD }}
password: ${{ secrets.B2_PYPI_PASSWORD }}

0 comments on commit ea8626b

Please sign in to comment.