This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
v0.1.0-alpha.10 #13
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
on: | |
release: | |
types: [created] | |
jobs: | |
release: | |
name: release ${{ matrix.target }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-unknown-linux-gnu | |
archive: tar.gz tar.xz | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Installing needed dependencies | |
run: sudo apt-get install -y libasound2-dev protobuf-compiler | |
- name: Installing bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Installing node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install webui dependencies | |
run: cd ./webui && bun install | |
- name: Build webui | |
run: cd ./webui && bun run build | |
- name: Running cargo build | |
if: matrix.target == 'x86_64-unknown-linux-gnu' | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
toolchain: stable | |
args: --release --target x86_64-unknown-linux-gnu | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Packaging final binary | |
if: matrix.target == 'x86_64-unknown-linux-gnu' | |
shell: bash | |
run: | | |
cd target/x86_64-unknown-linux-gnu/release | |
tar czvf superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz superviseur | |
shasum -a 256 superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz > superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz.sha256 | |
- name: Releasing assets | |
if: matrix.target == 'x86_64-unknown-linux-gnu' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/x86_64-unknown-linux-gnu/release/superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz | |
target/x86_64-unknown-linux-gnu/release/superviseur_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz.sha256 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |