Skip to content

Commit ccd3971

Browse files
Create python-publish.yml
1 parent 63c4d38 commit ccd3971

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflows uploads a Python Package using Flit when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Publish
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish:
12+
name: Upload a release to PyPI
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: 3.9
21+
22+
- name: Install Flit
23+
run: |
24+
python -m pip install flit
25+
26+
- name: Build Flit
27+
run: |
28+
python -m flit build
29+
30+
- name: Publish
31+
env:
32+
FLIT_USERNAME: __token__
33+
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
34+
run: python -m flit publish

0 commit comments

Comments
 (0)