-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (98 loc) · 2.73 KB
/
release-python.yml
File metadata and controls
114 lines (98 loc) · 2.73 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Author: Muhammad Usman (MuhammadUsmanGM) | Sig: MUGM-a3f7-9c2b
name: Release Python (PyPI)
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
defaults:
run:
working-directory: ferrumdb-python
jobs:
linux:
name: Build manylinux x86_64
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build wheels (manylinux2014 x86_64)
uses: PyO3/maturin-action@v1
with:
working-directory: ferrumdb-python
target: x86_64-unknown-linux-gnu
manylinux: 2014
args: --release --out dist --interpreter 3.8 3.9 3.10 3.11 3.12
sccache: true
- uses: actions/upload-artifact@v4
with:
name: wheels-linux-x86_64
path: ferrumdb-python/dist
if-no-files-found: error
windows:
name: Build Windows x86_64
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Build wheel
uses: PyO3/maturin-action@v1
with:
working-directory: ferrumdb-python
target: x86_64-pc-windows-msvc
args: --release --out dist --interpreter ${{ matrix.python-version }}
sccache: true
- uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.python-version }}
path: ferrumdb-python/dist
if-no-files-found: error
sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
working-directory: ferrumdb-python
command: sdist
args: --out dist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: ferrumdb-python/dist
if-no-files-found: error
publish:
name: Publish to PyPI
needs: [linux, windows, sdist]
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
steps:
- name: Download all wheels
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing dist/*