mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-09 08:49:38 +00:00
Refactor release job.
This commit is contained in:
parent
34db699972
commit
9fb4f5e71e
121
.github/workflows/release.yml
vendored
121
.github/workflows/release.yml
vendored
|
@ -6,89 +6,100 @@ on:
|
|||
- "v*"
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
name: Build Linux
|
||||
check:
|
||||
name: Check
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: sudo apt-get update; sudo apt-get install -y libspeechd-dev
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --all-features --examples
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all-features
|
||||
|
||||
check_web:
|
||||
name: Check Web
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libspeechd-dev
|
||||
rustup update
|
||||
cargo check --examples --release
|
||||
|
||||
build_web:
|
||||
name: Build Web
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: |
|
||||
rustup update
|
||||
rustup target add wasm32-unknown-unknown
|
||||
cargo check --examples --release --target wasm32-unknown-unknown
|
||||
|
||||
build_windows:
|
||||
name: Build Windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: |
|
||||
rustup update
|
||||
cargo check --examples --all-features --release
|
||||
|
||||
build_macos:
|
||||
name: Build MacOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: |
|
||||
rustup update
|
||||
cargo check --examples --release
|
||||
|
||||
build_ios:
|
||||
name: Build iOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- run: |
|
||||
rustup update
|
||||
rustup target add aarch64-apple-ios x86_64-apple-ios
|
||||
cargo install cargo-lipo
|
||||
cargo lipo --release
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
target: wasm32-unknown-unknown
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --all-features --examples --target wasm32-unknown-unknown
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all-features --target wasm32-unknown-unknown
|
||||
|
||||
publish_winrt_bindings:
|
||||
name: Publish winrt_bindings
|
||||
runs-on: windows-latest
|
||||
needs: [build_windows]
|
||||
needs: [check]
|
||||
env:
|
||||
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
target: wasm32-unknown-unknown
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
override: true
|
||||
- run: |
|
||||
rustup update
|
||||
cargo login $CARGO_TOKEN
|
||||
cd winrt_bindings
|
||||
cargo package
|
||||
cargo publish || true
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_linux, build_web, build_windows, build_macos, build_ios]
|
||||
needs: [check, check_web]
|
||||
env:
|
||||
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
target: wasm32-unknown-unknown
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libspeechd-dev
|
||||
rustup update
|
||||
cargo login $CARGO_TOKEN
|
||||
cargo publish
|
||||
|
|
Loading…
Reference in New Issue
Block a user