Skip to content

Commit

Permalink
Added PyPi release workflow (#10)
Browse files Browse the repository at this point in the history
The workflow trigger is whenever a new release
is published in GitHub.
The package used for publishing to PyPi is twine
PyPi_API_KEY is added to GitHub Secrets
Twine will use that to publish the built code.

Co-authored-by: Rares Gaia <[email protected]>
  • Loading branch information
raresgaia123 and Rares Gaia authored Jun 6, 2024
1 parent 5f6ee5d commit d2ab293
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to PyPi

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install build dependencies
run: pip install build

- name: Build the package
run: python -m build

- name: Publish to PyPI
env:
TWINE_API_KEY: ${{ secrets.PYPI_API_KEY }}
run: |
pip install twine
twine upload --skip-existing dist/*

0 comments on commit d2ab293

Please sign in to comment.