Skip to content

Add support for mixed_port, close #160 #24

Add support for mixed_port, close #160

Add support for mixed_port, close #160 #24

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
build:
name: Build and publish release
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
name: mihoro-x86_64-unknown-linux-gnu.tar.gz
cross: false
strip: true
- target: x86_64-unknown-linux-musl
name: mihoro-x86_64-unknown-linux-musl.tar.gz
cross: true
strip: true
- target: i686-unknown-linux-gnu
name: mihoro-i686-unknown-linux-gnu.tar.gz
cross: true
strip: true
- target: i686-unknown-linux-musl
name: mihoro-i686-unknown-linux-musl.tar.gz
cross: true
strip: true
- target: aarch64-unknown-linux-gnu
name: mihoro-aarch64-unknown-linux-gnu.tar.gz
cross: true
strip: false
- target: aarch64-unknown-linux-musl
name: mihoro-aarch64-unknown-linux-musl.tar.gz
cross: true
strip: false
steps:
- uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- name: Build binaries
uses: ClementTsang/[email protected]
with:
command: build
args: --release --target=${{ matrix.target }}
use-cross: ${{ matrix.cross }}
- name: Strip binaries
run: strip target/${{ matrix.target }}/release/mihoro
if: ${{ matrix.strip }}
- name: Package binaries
run: |
cd target/${{ matrix.target }}/release
tar -czvf ${{ matrix.name }} mihoro
cd -
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/${{ matrix.name }}
asset_name: ${{ matrix.name }}
tag: ${{ github.ref }}