Skip to content

Commit

Permalink
Merge pull request #54 from AngelFP/upload_to_pypi
Browse files Browse the repository at this point in the history
Add workflow to upload to pypi on release
  • Loading branch information
AngelFP authored Aug 9, 2023
2 parents 8557848 + 90b4c57 commit da0bd6b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish package to PyPI

on:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish package to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit da0bd6b

Please sign in to comment.