File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 44 release :
55 types :
66 - published
7+ workflow_dispatch :
8+ inputs :
9+ tag :
10+ description : Release tag to publish
11+ required : true
12+ type : string
713
814permissions :
915 contents : read
1420 runs-on : ubuntu-latest
1521
1622 steps :
23+ - name : Resolve release ref
24+ id : release_ref
25+ run : |
26+ if [ "${{ github.event_name }}" = "release" ]; then
27+ echo "ref=refs/tags/${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
28+ else
29+ echo "ref=refs/tags/${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
30+ fi
31+
1732 - name : Check out repository
1833 uses : actions/checkout@v4
34+ with :
35+ ref : ${{ steps.release_ref.outputs.ref }}
1936
2037 - name : Set up Python
2138 uses : actions/setup-python@v5
Original file line number Diff line number Diff line change 55
66permissions :
77 contents : write
8+ actions : write
89
910jobs :
1011 release :
6869 --title "$TAG" \
6970 --generate-notes \
7071 --target "${{ github.sha }}"
72+
73+ - name : Dispatch publish workflow
74+ env :
75+ GH_TOKEN : ${{ github.token }}
76+ run : |
77+ gh workflow run "Publish to PyPI" \
78+ --ref main \
79+ -f tag="$TAG"
You can’t perform that action at this time.
0 commit comments