-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (36 loc) · 1016 Bytes
/
deploy-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build-and-upload:
name: Build and upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install alsa.pc
run: sudo apt-get install -y libasound2-dev cmake
- name: Build
run: cargo build --verbose --release
- name: Run tests
run: cargo test --verbose
- name: Build archive
shell: bash
run: |
binary_name="rebels"
dirname="$binary_name-${{ env.VERSION }}-x86_64-unknown-linux-gnu"
mkdir "$dirname"
mv "target/release/$binary_name" "$dirname"
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ env.ASSET }}