1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
name: pypi
on:
create:
tags:
- '*'
defaults:
run:
shell: bash -l {0}
jobs:
pypi:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
name: upload to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: build
run: |
pip install .[actions]
rm -f dist/*
python -m build
- name: upload
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
twine upload dist/*
|