Skip to content

cleaned up and added timing #3

cleaned up and added timing

cleaned up and added timing #3

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build:
name: ${{ matrix.platform.os_name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
bin: honey-explore
name: honey-explore-Linux-x86_64-musl.tar.gz
- os_name: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: honey-explore.exe
name: honey-explore-Windows-x86_64.zip
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: honey-explore
name: honey-explore-Darwin-x86_64.tar.gz
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: honey-explore
name: honey-explore-Darwin-aarch64.tar.gz
steps:
- uses: actions/checkout@v3
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Install musl-tools on Linux
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.platform.name, 'musl')
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: stable
args: "--release"
strip: true
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
else
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi
cd -
if: startsWith( github.ref, 'refs/tags/v' )
- name: Publish release artifacts
uses: actions/upload-artifact@v3
with:
name: honey-explore-${{ matrix.platform.os_name }}
path: "honey-explore-*"
if: startsWith( github.ref, 'refs/tags/v' )
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "honey-explore-*"
if: startsWith( github.ref, 'refs/tags/v' )