Skip to content

Commit bc3d3d1

Browse files
authored
Merge pull request #894 from henryiii/henryiii/ci/release
ci: release to PyPI from CI on GitHub Release
2 parents 88c8e5c + a1342c1 commit bc3d3d1

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/release.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
release:
7+
types:
8+
- published
9+
10+
jobs:
11+
dist:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Build SDist and wheel
17+
run: pipx run build
18+
19+
- uses: actions/upload-artifact@v2
20+
with:
21+
path: dist/*
22+
23+
- name: Check metadata
24+
run: pipx run twine check dist/*
25+
26+
publish:
27+
needs: [dist]
28+
runs-on: ubuntu-latest
29+
if: github.event_name == 'release' && github.event.action == 'published'
30+
31+
steps:
32+
- uses: actions/download-artifact@v2
33+
with:
34+
name: artifact
35+
path: dist
36+
37+
- uses: pypa/[email protected]
38+
with:
39+
user: __token__
40+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)