Skip to content

Added workflow to build releases #27

Added workflow to build releases

Added workflow to build releases #27

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-${{ matrix.target }}.${{ matrix.ext }}

Check failure on line 21 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Build and Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 21, Col: 24): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.target .github/workflows/release.yml (Line: 25, Col: 24): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.target
- os: macos-latest
target: aarch64-apple-darwin
ext: dylib
file_name: partitioner-${{ matrix.target }}.${{ matrix.ext }}
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Build Release
run: |
cargo build --release --target ${{ matrix.target }}
artifact_name="partitioner-${{ matrix.target }}.${{ matrix.ext }}"
mv "./target/${{ matrix.target }}/release/libpartitioner.${{ matrix.ext }}" "./target/${{ matrix.target }}/release/$artifact_name"
echo "ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.file_name }}
asset_name: ${{ matrix.file_name }}
tag: ${{ github.ref }}