Skip to content

Fix to use houseabsolute/actions-rust-cross to release build #13

Fix to use houseabsolute/actions-rust-cross to release build

Fix to use houseabsolute/actions-rust-cross to release build #13

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
branches:
- 'fix-release-build'
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
targets:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-14
- target: aarch64-apple-darwin
os: macos-14
runs-on: ${{ matrix.targets.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: rustup target add ${{ matrix.targets.target }}
- name: Build
uses: houseabsolute/[email protected]
with:
command: build
target: ${{ matrix.targets.target }}
args: "--release"
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> ${GITHUB_ENV}
- name: Archive
run: tar -czf stu-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz -C target/${{ matrix.targets.target }}/release stu
- name: Checksum
run: shasum -a 256 stu-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.targets.target }}
path: stu-${{ env.RELEASE_VERSION }}-${{ matrix.targets.target }}.tar.gz
if-no-files-found: error
# release:
# permissions:
# contents: write
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# path: releases
# pattern: release-*
# merge-multiple: true
# - name: Checksum
# run: sha256sum releases/* > ./releases/checksum.txt
# - name: Create Draft Release
# uses: softprops/[email protected]
# with:
# draft: true
# generate_release_notes: true
# make_latest: true
# files: |
# releases/*