-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (76 loc) · 2.01 KB
/
release-python.yml
File metadata and controls
82 lines (76 loc) · 2.01 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
name: Release Python Package
on:
workflow_dispatch:
push:
tags:
- "common/v**"
jobs:
macos-wheels:
name: Build macos wheels
runs-on: macos-latest
env:
CXXFLAGS: "-std=c++11 -stdlib=libc++"
steps:
- uses: actions/checkout@v2
- uses: ./.github/action-common-python-release
with:
artifact-key: macos
maturin-target: universal2-apple-darwin
repo-token: ${{ secrets.GITHUB_TOKEN }}
linux-wheels:
name: Build linux wheels
runs-on: ubuntu-latest
env:
CXXFLAGS: "-std=c++11"
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v2
- uses: ./.github/action-common-python-release
with:
artifact-key: linux-${{ matrix.target }}
maturin-target: ${{ matrix.target }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
windows-wheels:
name: Build windows wheels
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/action-common-python-release
with:
artifact-key: windows
python-architecture: x64
rust-target: x86_64-pc-windows-msvc
repo-token: ${{ secrets.GITHUB_TOKEN }}
sdist:
name: Build source distribution
runs-on: ubuntu-latest
env:
CXXFLAGS: "-std=c++11"
steps:
- uses: actions/checkout@v2
- uses: ./.github/action-common-python-release
with:
artifact-key: sdist
maturin-command: sdist
repo-token: ${{ secrets.GITHUB_TOKEN }}
publish-python:
name: Publish package to PyPI
runs-on: ubuntu-latest
needs: [ macos-wheels, linux-wheels, windows-wheels, sdist ]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
path: wheels
pattern: wheels-*
merge-multiple: true
- name: List wheels to upload
run: ls wheels/
- name: Publish to PyPI
uses: messense/maturin-action@v1
with:
command: upload
args: --skip-existing wheels/*