Skip to content

Fix musl releases by installing musl-tools #42

Fix musl releases by installing musl-tools

Fix musl releases by installing musl-tools #42

Workflow file for this run

name: release
on:
push:
tags:
- "*"
jobs:
release:
name: "Release"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: gfold
asset_name: gfold-linux-gnu-x86-64
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
artifact_name: gfold
asset_name: gfold-linux-musl-x86-64
target: x86_64-unknown-linux-musl
- os: windows-latest
artifact_name: gfold.exe
asset_name: gfold-windows-x86-64.exe
target: x86_64-pc-windows-msvc
- os: macos-latest
artifact_name: gfold
asset_name: gfold-darwin-aarch64
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- if: matrix.target == x86_64-unknown-linux-musl

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

View workflow run for this annotation

GitHub Actions / release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 35, Col: 13): Unrecognized named-value: 'x86_64-unknown-linux-musl'. Located at position 18 within expression: matrix.target == x86_64-unknown-linux-musl
run: sudo apt update && sudo apt install -y musl-tools
- run: cargo build --release --locked --target ${{ matrix.target }}
- shell: bash
run: |
if [ $(echo ${{ github.ref }} | grep "rc") ]; then
echo "PRERELEASE=true" >> $GITHUB_ENV
echo "PRERELEASE=true"
else
echo "PRERELEASE=false" >> $GITHUB_ENV
echo "PRERELEASE=false"
fi
echo $PRERELEASE
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-musl" ]]; then
mv target/${{ matrix.target }}/release/${{ matrix.artifact_name }} ${{ matrix.asset_name }}
else
mv target/release/${{ matrix.artifact_name }} ${{ matrix.asset_name }}
fi
- uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset_name }}
prerelease: ${{ env.PRERELEASE }}
body: "Please refer to **[CHANGELOG.md](https://github.com/nickgerace/gfold/blob/main/CHANGELOG.md)** for information on this release."