Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Rust
on:
push:
tags:
- 'v*'

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
- name: Gzip aritfacts
run: gzip -c target/${{ matrix.target }}/release/${{ github.event.repository.name }} > target/${{ github.event.repository.name }}.${{ matrix.target }}.gz
- name: Upload aritfacts
uses: actions/upload-artifact@v3
with:
path: |
target/${{ github.event.repository.name }}.*.gz
- name: Release
uses: softprops/action-gh-release@v1 # https://github.com/softprops/action-gh-release
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
prerelease: true
files: |
target/${{ github.event.repository.name }}.*.gz