-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.42 KB
/
wheel_builder.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Wheel builder
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build source distribution
run: |
python -m pip install -U pip build
python -m build --sdist
- name: Test source distribution
run: |
python -m pip install dist/*.gz
cd .. # Can't import millenniumdb_driver within millenniumdb_driver's src directory
python -c "import millenniumdb_driver, sys; print(millenniumdb_driver.__version__); sys.exit(0)"
- name: Check README rendering for PyPI
run: |
python -m pip install twine
python -m twine check dist/*.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.gz
if-no-files-found: error
- name: check
run: du .
publish_to_pypi:
needs: build
name: Upload release to PyPI
runs-on: ubuntu-22.04
steps:
- name: Download packages
uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Print out all packages
run: ls -lhS dist
- name: Publish package distribuions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_API_TOKEN }}