Skip to content

uniffi-bindgen 0.26.1 #23

uniffi-bindgen 0.26.1

uniffi-bindgen 0.26.1 #23

Workflow file for this run

on:
push:
branches:
- main
tags:
- 'uniffi-bindgen-*'
paths:
- .github/workflows/uniffi-bindgen.yml
- uniffi-bindgen/**
pull_request:
paths:
- .github/workflows/uniffi-bindgen.yml
- uniffi-bindgen/**
workflow_dispatch:
name: uniffi-bindgen
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build-sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: PyO3/maturin-action@v1
with:
command: sdist
working-directory: uniffi-bindgen
args: -o dist
- name: Upload sdist artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: uniffi-bindgen/dist
build-wheel:
name: Build on ${{ matrix.platform.os }} for ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os: ubuntu-latest
target: x86_64
- os: ubuntu-latest
target: i686
- os: ubuntu-latest
target: aarch64
- os: macos-latest
target: x86_64
- os: macos-latest
target: aarch64
- os: windows-latest
target: x86_64
- os: windows-latest
target: i686
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: PyO3/maturin-action@v1
with:
working-directory: uniffi-bindgen
target: ${{ matrix.platform.target }}
manylinux: auto
args: -b bin --release -o dist
sccache: 'true'
- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: uniffi-bindgen/dist
release-pypi:
permissions:
# Used to sign the release's artifacts with sigstore-python.
id-token: write
# Used to upload release artifacts.
contents: write
name: Publish to PyPI
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [build-wheel, build-sdist]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Publish
env:
MATURIN_PASSWORD: ${{ secrets.MATURIN_PASSWORD }}
run: |
set -ex
pip install maturin
maturin upload -u __token__ --skip-existing *
- name: Sigstore Sign
uses: sigstore/[email protected]
with:
inputs: ./*.whl
upload-signing-artifacts: true
- name: Release signing artifacts
uses: softprops/action-gh-release@v1
with:
files: |
*.whl
*.sig
*.crt
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
generate_release_notes: true