Skip to content

debug artifacts

debug artifacts #155

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- "v*"
paths-ignore:
- "**.md"
- "img/**"
- LICENSE
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
targets:
- x86_64-apple-darwin
- aarch64-apple-darwin
artifact-suffix: macos-universal
- os: ubuntu-latest
targets:
- x86_64-unknown-linux-gnu
artifact-suffix: linux-amd64
- os: windows-latest
targets:
- x86_64-pc-windows-msvc
artifact-suffix: windows-amd64
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set version
id: set-version
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
else
echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
fi
- name: Set up Rust
run: |
rustup toolchain install stable --profile minimal
for target in $(jq -r '.[]' <<< '${{ toJSON(matrix.targets) }}'); do
rustup target add "$target"
done
- name: Restore cargo cache
uses: Swatinem/rust-cache@v2
- name: Build
env:
CARGO_TERM_COLOR: always
run: |
if [[ "$RUNNER_OS" == "macOS" ]]; then
cargo xtask bundle-universal haas_effect --release
else
target=$(jq -r '.[0]' <<< '${{ toJSON(matrix.targets) }}')
cargo xtask bundle haas_effect --release --target "$target"
fi
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: haas_effect-${{ steps.set-version.outputs.VERSION }}-${{ matrix.artifact-suffix }}
path: target/bundled/
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
- name: List artifacts
run: ls -R
- name: Create draft release
uses: softprops/action-gh-release@v2
with:
draft: true
generate_release_notes: true
files: "haas_effect-*/*.zip"