build(cargo): update kook fix #4 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
SHORT_NAME: walle-k | |
CRATE_NAME: walle-k | |
jobs: | |
compile: | |
name: Compile | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# Linux | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
release_name: x86_64-linux-musl | |
postfix: "" | |
extra_args: "" | |
cross: true | |
- os: ubuntu-latest | |
target: i686-unknown-linux-musl | |
release_name: i686-linux-musl | |
postfix: "" | |
extra_args: "" | |
cross: true | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-musl | |
release_name: aarch64-linux-musl | |
postfix: "" | |
extra_args: "" | |
cross: true | |
- os: ubuntu-latest | |
target: riscv64gc-unknown-linux-gnu | |
release_name: riscv64gc-linux-gnu | |
postfix: "" | |
extra_args: "" | |
cross: true | |
- os: ubuntu-latest | |
target: armv7-unknown-linux-gnueabihf | |
release_name: armv7-linux-gnueabihf | |
postfix: "" | |
extra_args: "" | |
cross: true | |
# Windows GNU | |
- os: ubuntu-latest | |
target: x86_64-pc-windows-gnu | |
release_name: x86_64-windows-gnu.exe | |
postfix: ".exe" | |
extra_args: "" | |
cross: true | |
- os: ubuntu-latest | |
target: i686-pc-windows-gnu | |
release_name: i686-windows-gnu.exe | |
postfix: ".exe" | |
extra_args: "" | |
cross: true | |
# Mac OSX | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
release_name: x86_64-mac | |
postfix: "" | |
extra_args: "" | |
cross: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Resume cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ matrix.target }}-release-${{ hashFiles('**/Cargo.toml') }} | |
restore-keys: | | |
${{ matrix.target }}-release | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: ${{ matrix.cross }} | |
command: build | |
args: --release --target ${{ matrix.target }} ${{ matrix.extra_args }} | |
- name: Rename binary | |
run: mv target/${{ matrix.target }}/release/${{ env.CRATE_NAME }}${{ matrix.postfix }} ${{ env.SHORT_NAME }}-${{ matrix.release_name }} | |
- name: Upload binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: compile | |
path: ${{ env.SHORT_NAME }}-${{ matrix.release_name }} | |
release: | |
name: Release | |
needs: [compile] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Download binaries | |
uses: actions/download-artifact@v2 | |
with: | |
name: compile | |
path: ./packages | |
# - name: Compress | |
# run: bash ./.github/compress.sh | |
- name: Github release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
packages/* | |
LICENSE |