Skip to content

Commit

Permalink
chore(ci): add conditional to skip pypi release (#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
heitorlessa authored Jul 25, 2022
1 parent 389e066 commit 626acc5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ on:
description: "Version to be released in PyPi, Docs, and Lambda Layer, e.g. v1.26.4"
default: v1.26.4
required: true
skip_pypi:
description: "Skip publishing to PyPi as it can't publish more than once. Useful for semi-failed releases"
default: false
type: boolean
required: false

jobs:
release:
Expand Down Expand Up @@ -74,13 +79,16 @@ jobs:
git commit -m "chore(ci): update project with version ${RELEASE_VERSION}"
git push origin HEAD:refs/heads/develop
- name: Build python package and wheel
if: ${{ !inputs.skip_pypi }}
run: poetry build
- name: Upload to PyPi test
if: ${{ !inputs.skip_pypi }}
run: make release-test
env:
PYPI_USERNAME: __token__
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }}
- name: Upload to PyPi prod
if: ${{ !inputs.skip_pypi }}
run: make release-prod
env:
PYPI_USERNAME: __token__
Expand Down

0 comments on commit 626acc5

Please sign in to comment.