Skip to content

release: Zippo v0.1.0 #25

release: Zippo v0.1.0

release: Zippo v0.1.0 #25

Workflow file for this run

name: Build and release
on:
push:
tags:
- "v**"
workflow_dispatch:
permissions: write-all
env:
CRATE_NAME: zippo
GITHUB_TOKEN: ${{ github.token }}
RUST_BACKTRACE: 1
jobs:
test:
name: ${{ matrix.platform.os_name }} || nightly
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-musl
bin: zippo-linux-x86_64-musl
- os_name: linux-arm
os: ubuntu-20.04
target: arm-unknown-linux-musleabi
bin: zippo-linux-arm-musl
- os_name: linux-i686
os: ubuntu-20.04
target: i686-unknown-linux-musl
bin: zippo-linux-i686-musl
skip_tests: true
- os_name: windows-aarch64
os: windows-latest
target: aarch64-pc-windows-msvc
bin: zippo-windows-aarch64.exe
skip_tests: true
- os_name: windows-i686
os: windows-latest
target: i686-pc-windows-msvc
bin: zippo-windows-i686.exe
skip_tests: true
- os_name: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
bin: zippo-windows-x86_64.exe
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
bin: zippo-darwin-x86_64
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: zippo-darwin-aarch64
skip_tests: true
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.target, 'musl')
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: nightly
args: "--locked --release"
strip: true
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
mv zippo.exe ${{ matrix.platform.bin }}
else
mv zippo ${{ matrix.platform.bin }}
fi
cd -
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}"