53 lines
1.4 KiB
YAML
Raw Normal View History

2021-09-19 01:13:33 -07:00
name: Build Releases
on:
push:
tags:
- v*.*.*
env:
CARGO_TERM_COLOR: always
jobs:
build-cross:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
2021-10-19 01:13:56 -07:00
- x86_64-unknown-linux-musl
- i686-unknown-linux-gnu
2021-10-19 01:13:56 -07:00
- i686-unknown-linux-musl
2021-09-19 01:13:33 -07:00
- armv7-unknown-linux-gnueabihf
2021-10-19 01:13:56 -07:00
- armv7-unknown-linux-musleabihf
- arm-unknown-linux-gnueabihf
2021-10-19 01:13:56 -07:00
- arm-unknown-linux-musleabihf
2021-09-19 03:32:05 -07:00
- aarch64-unknown-linux-gnu
2021-10-19 01:13:56 -07:00
- aarch64-unknown-linux-musl
2021-09-19 01:13:33 -07:00
steps:
- uses: actions/checkout@v4
2021-09-19 01:13:33 -07:00
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
- name: Rename artifacts and compress
run: |
cd target/${{ matrix.target }}/release
mv client phantun_client
mv server phantun_server
2021-09-19 01:54:41 -07:00
zip phantun_${{ matrix.target }}.zip phantun_client phantun_server
2021-09-19 01:13:33 -07:00
- name: Upload Github Assets
uses: softprops/action-gh-release@v2
2021-09-19 01:13:33 -07:00
with:
files: target/${{ matrix.target }}/release/*.zip
prerelease: ${{ contains(github.ref, '-') }}