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
|
2021-09-22 22:14:16 -07:00
|
|
|
- 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
|
2021-09-22 22:14:16 -07:00
|
|
|
- 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:
|
2023-09-05 08:44:16 +00:00
|
|
|
- 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
|
2024-03-11 08:42:23 +00:00
|
|
|
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, '-') }}
|