Skip to content

Merge pull request #560 from hatoo/1.4.6 #53

Merge pull request #560 from hatoo/1.4.6

Merge pull request #560 from hatoo/1.4.6 #53

Workflow file for this run

name: Publish
on:
push:
tags:
- "*.*.*"
jobs:
publish:
name: Publish for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: oha
release_name: oha-linux-amd64
target: x86_64-unknown-linux-musl
additional_args: "--features vsock"
- os: windows-latest
artifact_name: oha.exe
release_name: oha-windows-amd64.exe
target: x86_64-pc-windows-msvc
additional_args: ""
- os: macos-latest
artifact_name: oha
release_name: oha-macos-amd64
target: x86_64-apple-darwin
additional_args: ""
- os: ubuntu-latest
artifact_name: oha
release_name: oha-linux-arm64
target: aarch64-unknown-linux-musl
additional_args: "--features vsock"
- os: macos-14
artifact_name: oha
release_name: oha-macos-arm64
target: aarch64-apple-darwin
additional_args: ""
steps:
- uses: ilammy/setup-nasm@v1
- uses: actions/checkout@v4
- name: Install musl-tools on Linux
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.target, 'musl')
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
target: ${{ matrix.target }}
args: --release --target ${{ matrix.target }} --locked --no-default-features --features rustls ${{ matrix.additional_args }}
strip: true
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.release_name }}
tag: ${{ github.ref }}