Skip to content

Commit 110df80

Browse files
authored
Update publish workflow (#54)
* Fix job naming issue * Update publish workflow * Fix duplicate workflow
1 parent b237400 commit 110df80

File tree

2 files changed

+71
-36
lines changed

2 files changed

+71
-36
lines changed

.github/workflows/ pythonpublish-linux.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Package & Publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
linux-wheels:
9+
runs-on: ubuntu-latest
10+
container: konstin2/maturin
11+
steps:
12+
- name: Build wheel
13+
uses: actions/checkout@v1
14+
run: |
15+
maturin publish -b cffi --no-sdist -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --manylinux 2014
16+
aarch-linux-wheels:
17+
runs-on: ubuntu-latest
18+
container: messense/manylinux_2_24-cross:aarch64
19+
steps:
20+
- name: Build wheel
21+
uses: actions/checkout@v1
22+
run: |
23+
curl https://sh.rustup.rs -sSf | bash -s -- -y
24+
source $HOME/.cargo/env
25+
rustup target add aarch64-unknown-linux-gnu
26+
maturin publish -b cffi --no-sdist -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --manylinux 2014
27+
osx-wheels:
28+
runs-on: macos-latest
29+
steps:
30+
- name: checkout
31+
uses: actions/checkout@v1
32+
- name: Setup Rust environment
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
profile: minimal
36+
toolchain: stable
37+
override: true
38+
- name: Setup Python environment
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: 3.7
42+
- name: maturin build
43+
run: |
44+
pip install --upgrade pip
45+
pip install --no-cache-dir cffi maturin==0.11.4
46+
maturin build -b cffi --release
47+
- name: Publish with Maturin
48+
run: maturin publish -b cffi --no-sdist -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
49+
windows-wheels:
50+
runs-on: windows-latest
51+
steps:
52+
- name: checkout
53+
uses: actions/checkout@v1
54+
- name: Setup Rust environment
55+
uses: actions-rs/toolchain@v1
56+
with:
57+
profile: minimal
58+
toolchain: stable
59+
override: true
60+
- name: Setup Python environment
61+
uses: actions/setup-python@v2
62+
with:
63+
python-version: 3.7
64+
- name: maturin build
65+
run: |
66+
pip install --upgrade pip
67+
pip install --no-cache-dir cffi maturin==0.11.4
68+
maturin build -b cffi --release
69+
- name: Publish with Maturin
70+
run: maturin publish -b cffi --no-sdist -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
71+

0 commit comments

Comments
 (0)