We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83f857c commit b605b8cCopy full SHA for b605b8c
1 file changed
.github/workflows/release.yml
@@ -3,6 +3,17 @@ name: Release
3
on:
4
release:
5
types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ upload_to_pypi:
9
+ description: 'Upload to PyPI'
10
+ required: true
11
+ default: 'false'
12
+ type: choice
13
+ options:
14
+ - 'true'
15
+ - 'false'
16
+
17
18
jobs:
19
publish:
@@ -30,14 +41,15 @@ jobs:
30
41
twine check dist/*
31
42
32
43
- name: Publish to PyPI
44
+ if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.upload_to_pypi == 'true')
33
45
env:
34
46
TWINE_USERNAME: __token__
35
47
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
36
48
run: |
37
49
twine upload dist/*
38
50
39
51
- name: Upload release artifacts
40
- uses: actions/upload-artifact@v3
52
+ uses: actions/upload-artifact@v4
53
with:
54
name: release-dist
55
path: dist/
0 commit comments