Skip to content

Release pipeline

Release pipeline #5

Workflow file for this run

name: Release
on:
pull_request:
workflow_dispatch:
env:
RUST_VERSION: 1.68
jobs:
build-native-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Rust
run: |
rustup default ${{ env.RUST_VERSION }}
- name: Build Rust Project
run: cargo build --manifest-path=./rust-bindings/Cargo.toml --release
- name: Upload linux library
uses: actions/upload-artifact@master
with:
name: linux-library
path: ./rust-bindings/target/release/librust_bindings.so
build-native-macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Rust
run: |
rustup default ${{ env.RUST_VERSION }}
- name: Build Rust Project
run: cargo build --manifest-path=./rust-bindings/Cargo.toml --release
- name: Upload macos library
uses: actions/upload-artifact@master
with:
name: macos-library
path: ./rust-bindings/target/release/librust_bindings.dylib
build-native-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Rust
run: |
rustup default ${{ env.RUST_VERSION }}
- name: Build Rust Project
run: cargo build --manifest-path=./rust-bindings/Cargo.toml --release
- name: Upload windows library
uses: actions/upload-artifact@master
with:
name: windows-library
path: ./rust-bindings/target/release/rust_bindings.dll
build-and-release:
needs: [build-native-ubuntu, build-native-macos, build-native-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download linux library
uses: actions/download-artifact@master
with:
name: linux-library
path: rust-bindings/target/release
- name: Download macos library
uses: actions/download-artifact@master
with:
name: macos-library
path: rust-bindings/target/release
- name: Download windows library
uses: actions/download-artifact@master
with:
name: windows-library
path: rust-bindings/target/release
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Pack
run: dotnet pack -c Release -p:RunRustBuild=false -p:IncludeAllRustBuilds=true
- name: Upload package for validation
uses: actions/upload-artifact@master
with:
name: package-validation
path: ./src/bin/Release
# - name: Publish to NuGet
# run: dotnet nuget push "src/bin/Release/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json