Commit afef1ae 1 parent 6d64534 commit afef1ae Copy full SHA for afef1ae
File tree 2 files changed +60
-9
lines changed
2 files changed +60
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Ubuntu
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v[0-9]+.[0-9]+.[0-9]+"
7
+
8
+ permissions :
9
+ contents : write
10
+
11
+ env :
12
+ CARGO_TERM_COLOR : always
13
+
14
+ jobs :
15
+ build-and-upload :
16
+
17
+ name : Build and upload
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+
23
+ - name : Get the release version from the tag
24
+ shell : bash
25
+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
26
+
27
+ - name : Install alsa.pc
28
+ run : sudo apt-get install -y libasound2-dev
29
+
30
+ - name : Build
31
+ run : cargo build --verbose
32
+
33
+ - name : Run tests
34
+ run : cargo test --verbose
35
+
36
+ - name : Build archive
37
+ shell : bash
38
+ run : |
39
+ binary_name="rebels"
40
+
41
+ dirname="$binary_name-${{ env.VERSION }}-x86_64-unknown-linux-gnu"
42
+ mkdir "$dirname"
43
+ mv "target/release/$binary_name" "$dirname"
44
+ tar -czf "$dirname.tar.gz" "$dirname"
45
+ echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
46
+
47
+ - name : Release
48
+ uses : softprops/action-gh-release@v1
49
+ with :
50
+ files : |
51
+ ${{ env.ASSET }}
Original file line number Diff line number Diff line change 8
8
permissions :
9
9
contents : write
10
10
11
+ env :
12
+ CARGO_TERM_COLOR : always
13
+
11
14
jobs :
12
15
build-and-upload :
16
+
13
17
name : Build and upload
14
18
runs-on : ${{ matrix.os }}
15
19
@@ -27,21 +31,13 @@ jobs:
27
31
- build : windows
28
32
os : windows-latest
29
33
target : x86_64-pc-windows-gnu
30
-
31
- - build : linux
32
- os : ubuntu-latest
33
- target : x86_64-unknown-linux-musl
34
34
35
35
steps :
36
36
- uses : actions/checkout@v4
37
37
38
38
- name : Get the release version from the tag
39
39
shell : bash
40
40
run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
41
-
42
- - name : Install alsa.pc on Ubuntu
43
- if : matrix.os == 'ubuntu-latest'
44
- run : sudo apt-get install -y libasound2-dev libudev-dev librust-alsa-sys-dev && export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/
45
41
46
42
- name : Install Rust
47
43
# Or @nightly if you want
52
48
targets : ${{ matrix.target }}
53
49
54
50
- name : Build
55
- run : cargo build --verbose --release --target ${{ matrix.target }}
51
+ uses : actions-rs/cargo@v1
52
+ with :
53
+ use-cross : true
54
+ command : build
55
+ args : --verbose --release --target ${{ matrix.target }}
56
56
57
57
- name : Run tests
58
58
run : cargo test --verbose
You can’t perform that action at this time.
0 commit comments