Skip to content

build: migrate to clap v4 #20

build: migrate to clap v4

build: migrate to clap v4 #20

Workflow file for this run

# Origin config by @Kilerd
name: Build Release
on:
push:
branches: [ master ]
jobs:
release:
name: Pre-Release on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
platform: [macos-x86_64, linux_glibc-x86_64, linux_musl-x86_64]
include:
- platform: macos-x86_64
target: x86_64-apple-darwin
os: macos-latest
bin: fibonacci
- platform: linux_glibc-x86_64
target: x86_64-unknown-linux-gnu
os: ubuntu-latest
bin: fibonacci
- platform: linux_musl-x86_64
target: x86_64-unknown-linux-musl
os: ubuntu-latest
bin: fibonacci
steps:
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
toolchain: stable
override: true
- name: Checkout code
uses: actions/checkout@v1
- name: some tricks for featrues
run: export RUSTC_BOOTSTRAP=1
- name: Run code build
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --release --target ${{ matrix.target }}
- name: Prepare assets
shell: bash
run: |
mv target/${{ matrix.target }}/release/${{ matrix.bin }} .
tar -cvf ${{ matrix.target }}.tar LICENSE ${{ matrix.bin }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.target }}.tar
tag_name: v0.4.1
prerelease: true