Skip to content

Commit 9a7b215

Browse files
committed
chore: switch to manual CD
1 parent 1683905 commit 9a7b215

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/CD.yml

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

0 commit comments

Comments
 (0)