Skip to content

Commit

Permalink
Add github action file to create the pypi wheels on push
Browse files Browse the repository at this point in the history
cheers @EwoutH your work is very useful to me :D
  • Loading branch information
hugoledoux committed Nov 12, 2021
1 parent ef466ce commit 936e5e3
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Python bindings

on:
release:
types: [created]

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: messense/maturin-action@v1
with:
maturin-version: latest
manylinux: auto
command: publish
args: --no-sdist -u hledoux -p ${{ secrets.PASSWORD_PYPI }}

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: messense/maturin-action@v1
with:
maturin-version: latest
command: publish
args: --no-sdist -u hledoux -p ${{ secrets.PASSWORD_PYPI }}

macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install aarch64-apple-darwin toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
- uses: messense/maturin-action@v1
with:
maturin-version: latest
command: publish
args: -i python --no-sdist --universal2 -u hledoux -p ${{ secrets.PASSWORD_PYPI }}

1 comment on commit 936e5e3

@EwoutH
Copy link
Contributor

@EwoutH EwoutH commented on 936e5e3 Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome, great to see it's portable to other repositories!

Please sign in to comment.