Skip to content

Added workflow to build releases #30

Added workflow to build releases

Added workflow to build releases #30

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
actions: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
ext: so
file_name: partitioner-x86_64-unknown-linux-gnu.so
- os: macos-latest
target: aarch64-apple-darwin
ext: dylib
file_name: partitioner-aarch64-apple-darwin.dylib
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions/checkout@v3
- name: Build
run: |
cargo build --release --target ${{ matrix.target }}
mv "./target/${{ matrix.target }}/release/libpartitioner.${{ matrix.ext }}" "./target/${{ matrix.target }}/release/${{ matrix.file_name }}"
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./target/${{ matrix.target }}/release/${{ matrix.file_name }}
asset_name: ${{ matrix.file_name }}
tag: ${{ github.ref }}