-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1013 Bytes
/
build_wheels.yaml
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
37
38
39
40
41
42
name: Build Wheels
on:
pull_request:
push:
tags:
- "v*.*.*"
jobs:
build_wheel:
name: "build_wheel"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install poetry
uses: snok/install-poetry@v1
- name: Build sdist
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry build --format=sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_to_pypi:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs:
[
"build_wheel",
]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: artifact/
skip_existing: true