Skip to content

Commit 51d15bb

Browse files
committed
chore: add support for publishing fallback
1 parent c999f40 commit 51d15bb

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/publish.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,21 @@ name: Publish to PyPi
2323
# 9. Push latest release source code to master using release title as the commit message
2424
# 10. Builds latest documentation for new release, and update latest alias pointing to the new release tag
2525

26+
#
27+
# === Fallback mechanism due to external failures ===
28+
#
29+
# 1. Trigger "Publish to PyPi" workflow manually: https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
30+
# 2. Use the version released under Releases e.g. v1.13.0
31+
#
32+
2633
on:
2734
release:
2835
types: [published]
36+
workflow_dispatch:
37+
inputs:
38+
publish_version:
39+
description: 'Version to publish, e.g. v1.13.0'
40+
required: true
2941

3042
jobs:
3143
release:
@@ -40,7 +52,9 @@ jobs:
4052
python-version: "3.8"
4153
- name: Set release notes tag
4254
run: |
43-
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
55+
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
56+
# Replace publishing version if the workflow was triggered manually
57+
test -n $RELEASE_TAG_VERSION && RELEASE_TAG_VERSION=${{ github.event.inputs.publish_version }}
4458
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
4559
- name: Ensure new version is also set in pyproject and CHANGELOG
4660
run: |

0 commit comments

Comments
 (0)