Skip to content

chore(ci): add conditional to skip pypi release #1366

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
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: 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