-
Notifications
You must be signed in to change notification settings - Fork 48
34 lines (34 loc) · 1.04 KB
/
pypi.yml
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
34
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 numpy
- 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/*