Skip to content

Commit

Permalink
Add PyPi Release action
Browse files Browse the repository at this point in the history
  • Loading branch information
MHendricks authored Aug 12, 2022
1 parent 4ad4ad1 commit 1b1b57d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PyPi Release

on:
release:
types: [created]

jobs:

build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel twine
- name: Build wheel
run: |
python setup.py build bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --verbose dist/*

0 comments on commit 1b1b57d

Please sign in to comment.