-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (32 loc) · 1.08 KB
/
build_wheels.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
35
36
name: Build wheels
on: [push, pull_request]
jobs:
build:
name: Build source and wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build wheels
run: pipx run build
- uses: actions/upload-artifact@v3
with:
path: ./dist/*
upload_pypi:
needs: build
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
#repository_url: https://test.pypi.org/legacy/