@@ -3,12 +3,12 @@ name: Create release
3
3
on :
4
4
push :
5
5
tags :
6
- - ' v*'
6
+ - ' v*.*.* '
7
7
8
8
jobs :
9
9
10
10
pre :
11
- runs-on : ubuntu-16 .04
11
+ runs-on : ubuntu-18 .04
12
12
outputs :
13
13
version : ${{ steps.get_variables.outputs.version }}
14
14
artifact_name : ${{ steps.get_variables.outputs.artifact_name }}
@@ -19,34 +19,39 @@ jobs:
19
19
echo ::set-output name=version::${GITHUB_REF##*/}
20
20
21
21
build-and-publish :
22
- name : Build for ${{ matrix.os }}
22
+ name : Build and publish for ${{ matrix.os }}
23
23
runs-on : ${{ matrix.os }}
24
24
needs : [pre]
25
25
strategy :
26
26
matrix :
27
27
include :
28
- - os : ubuntu-16 .04
29
- pack : tar czf ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-linux.tar.gz target/release/${{ needs.pre.outputs.artifact_name }}
28
+ - os : ubuntu-18 .04
29
+ pack : tar czf ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-linux.tar.gz target/x86_64-unknown-linux-musl/ release/${{ needs.pre.outputs.artifact_name }}
30
30
asset_name : ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-linux.tar.gz
31
31
asset_content_type : application/gzip
32
+ build : cargo build --release --locked --target x86_64-unknown-linux-musl
32
33
- os : windows-2019
33
34
pack : Compress-Archive -DestinationPath ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-windows.zip -Path target\release\${{ needs.pre.outputs.artifact_name }}.exe
34
35
asset_name : ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-windows.zip
35
36
asset_content_type : application/zip
37
+ build : cargo build --release --locked
36
38
- os : macos-10.15
37
39
pack : tar czf ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-macos.tar.gz target/release/${{ needs.pre.outputs.artifact_name }}
38
40
asset_name : ${{ needs.pre.outputs.artifact_name }}-${{ needs.pre.outputs.version }}-macos.tar.gz
39
41
asset_content_type : application/gzip
42
+ build : cargo build --release --locked
40
43
steps :
41
44
- uses : actions/checkout@v2
45
+ - name : Install MUSL
46
+ if : matrix.os == 'ubuntu-18.04'
47
+ run : rustup target add x86_64-unknown-linux-musl
42
48
- name : Build
43
- run : cargo build --release --locked
49
+ run : ${{ matrix. build }}
44
50
- name : Pack
45
51
run : ${{ matrix.pack }}
46
- - name : Upload assets to release
47
- uses : svenstaro/upload-release-action@v2
52
+ - name : Release
53
+ uses : softprops/action-gh-release@v1
48
54
with :
49
- repo_token : ${{ secrets.GITHUB_TOKEN }}
50
- file : ${{ matrix.asset_name }}
51
- asset_name : ${{ matrix.asset_name }}
52
- tag : ${{ github.ref }}
55
+ files : ${{ matrix.asset_name }}
56
+ env :
57
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments