Skip to content

Commit da0bd6b

Browse files
authored
Merge pull request #54 from AngelFP/upload_to_pypi
Add workflow to upload to pypi on release
2 parents 8557848 + 90b4c57 commit da0bd6b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish package to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish package to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
# IMPORTANT: this permission is mandatory for trusted publishing
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python 3.8
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.8
20+
- name: Install pypa/build
21+
run: >-
22+
python3 -m
23+
pip install
24+
build
25+
--user
26+
- name: Build a binary wheel and a source tarball
27+
run: >-
28+
python3 -m
29+
build
30+
--sdist
31+
--wheel
32+
--outdir dist/
33+
.
34+
- name: Publish package distribution to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)