Skip to content

Commit

Permalink
Combine release workflow files to avoid running suite twice
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Oct 18, 2023
1 parent f081954 commit 402921c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 89 deletions.
85 changes: 0 additions & 85 deletions .github/workflows/release-python.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Rust Release
name: Release

on:
push:
Expand All @@ -14,11 +14,10 @@ jobs:
validation_py:
uses: ./.github/workflows/validation-python.yaml

build_release:
name: "build & deploy ${{ matrix.build }} binaries (cargo build)"
rust_release:
name: "build & deploy ${{ matrix.build }} binaries"
needs: [validation_rust, validation_py]
runs-on: ${{ matrix.os }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
include:
Expand Down Expand Up @@ -134,6 +133,77 @@ jobs:
files: |
${{ env.ASSET }}
linux_wheels:
runs-on: ubuntu-latest
needs: [validation_rust, validation_py]
steps:
- uses: actions/checkout@v3
- name: build libc wheels
uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
# container default is manylinux
args: --release -o dist -i 3.7 3.8 3.9 3.10 3.11 3.12 --manifest-path zspell-py/Cargo.toml
- name: build musl wheels
uses: messense/maturin-action@v1
with:
target: x86_64-unknown-linux-musl
manylinux: musllinux_1_1
command: build
args: --release -o dist -i 3.7 3.8 3.9 3.10 3.11 3.12 --manifest-path zspell-py/Cargo.toml
- name: upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

windows_wheels:
runs-on: windows-latest
needs: [validation_rust, validation_py]
steps:
- uses: actions/checkout@v3
- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist -i 3.7 3.8 3.9 3.10 3.11 3.12 --manifest-path zspell-py/Cargo.toml
- name: upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

macos_wheels:
runs-on: macos-latest
needs: [validation_rust, validation_py]
steps:
- uses: actions/checkout@v3
- uses: messense/maturin-action@v1
with:
command: build
args: --release -o dist -i 3.7 3.8 3.9 3.10 3.11 3.12 --universal2 --manifest-path zspell-py/Cargo.toml
- name: upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

release_all_wheels:
name: Release wheels
runs-on: ubuntu-latest
needs: [linux_wheels, macos_wheels, windows_wheels]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing *

deploy_book:
runs-on: ubuntu-latest
needs: [validation_rust, validation_py]
Expand Down

0 comments on commit 402921c

Please sign in to comment.