Skip to content

Commit

Permalink
update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrusch committed Sep 13, 2021
1 parent 8606895 commit 8770658
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Publish to PyPI

on:
release:
types: [ created ]
push:
tags:
- '*'

jobs:
publish:
if: github.actor == 'nkrusch' || github.actor == 'aubertc' || github.actor== 'ThomasRuby' || github.actor== 'seiller'
if: github.actor == 'nkrusch' || github.actor == 'aubertc' ||
github.actor== 'ThomasRuby' || github.actor== 'seiller'
name: Build Python distribution and publish to PyPI
runs-on: ubuntu-latest
steps:
Expand All @@ -21,10 +23,19 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install build setuptools wheel twine
- name: Run tests
run: make test

- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build
python -m twine upload dist/*
python -m twine upload dist/*
- uses: ncipollo/release-action@v1
with:
artifacts: "release.zip"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8770658

Please sign in to comment.