Start adding github actions release activity #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pypi | |
on: [push] | |
jobs: | |
pypi: | |
name: upload to pypi | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install build prerequisites | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
run: | | |
python -m pip install --upgrade twine build cibuildwheel | |
- name: sdist | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
run: | | |
python -m build --sdist | |
- name: wheel | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- name: upload | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
env: | |
TWINE_USERNAME: "__token__" | |
TWINE_PASSWORD: ${{ secrets.pypi_password }} | |
run: | | |
twine upload dist/* | |
twine upload wheelhouse/* |