Skip to content

Commit 626acc5

Browse files
authored
chore(ci): add conditional to skip pypi release (#1366)
1 parent 389e066 commit 626acc5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/publish.yml

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828
description: "Version to be released in PyPi, Docs, and Lambda Layer, e.g. v1.26.4"
2929
default: v1.26.4
3030
required: true
31+
skip_pypi:
32+
description: "Skip publishing to PyPi as it can't publish more than once. Useful for semi-failed releases"
33+
default: false
34+
type: boolean
35+
required: false
3136

3237
jobs:
3338
release:
@@ -74,13 +79,16 @@ jobs:
7479
git commit -m "chore(ci): update project with version ${RELEASE_VERSION}"
7580
git push origin HEAD:refs/heads/develop
7681
- name: Build python package and wheel
82+
if: ${{ !inputs.skip_pypi }}
7783
run: poetry build
7884
- name: Upload to PyPi test
85+
if: ${{ !inputs.skip_pypi }}
7986
run: make release-test
8087
env:
8188
PYPI_USERNAME: __token__
8289
PYPI_TEST_TOKEN: ${{ secrets.PYPI_TEST_TOKEN }}
8390
- name: Upload to PyPi prod
91+
if: ${{ !inputs.skip_pypi }}
8492
run: make release-prod
8593
env:
8694
PYPI_USERNAME: __token__

0 commit comments

Comments
 (0)