5
5
tags :
6
6
- ' v*'
7
7
8
+ env :
9
+ CARGO_INCREMENTAL : 0
10
+ CARGO_TERM_COLOR : always
11
+
8
12
permissions :
9
13
contents : write
10
14
@@ -13,18 +17,19 @@ jobs:
13
17
runs-on : ubuntu-latest
14
18
steps :
15
19
- name : Checkout source
16
- uses : actions/checkout@v2
17
- - name : Install musl
18
- uses : actions-rs/toolchain@v1
19
- with :
20
- target : x86_64-unknown-linux-musl
20
+ uses : actions/checkout@v3
21
+ - name : Install toolchain
22
+ run : |
23
+ rustup toolchain install stable --profile minimal --no-self-update \
24
+ --target x86_64-unknown-linux-musl
25
+ rustup default stable
26
+ echo "Installed:"
27
+ cargo --version
28
+ rustc --version --verbose
21
29
- name : Build release (Linux)
22
- uses : actions-rs/cargo@v1
23
- with :
24
- command : build
25
- args : --release --all-features --target x86_64-unknown-linux-musl
30
+ run : cargo build --release --all-features --target x86_64-unknown-linux-musl
26
31
- run : strip target/x86_64-unknown-linux-musl/release/gptman
27
- - uses : actions/upload-artifact@v2
32
+ - uses : actions/upload-artifact@v3
28
33
with :
29
34
name : binary-linux
30
35
path : target/x86_64-unknown-linux-musl/release/gptman
@@ -33,13 +38,19 @@ jobs:
33
38
runs-on : windows-latest
34
39
steps :
35
40
- name : Checkout source
36
- uses : actions/checkout@v2
41
+ uses : actions/checkout@v3
42
+ - name : Install toolchain
43
+ shell : bash
44
+ run : |
45
+ rustup toolchain install stable --profile minimal --no-self-update \
46
+ --target x86_64-pc-windows-msvc
47
+ rustup default stable
48
+ echo "Installed:"
49
+ cargo --version
50
+ rustc --version --verbose
37
51
- name : Build release (Windows)
38
- uses : actions-rs/cargo@v1
39
- with :
40
- command : build
41
- args : --release --all-features --target=x86_64-pc-windows-msvc
42
- - uses : actions/upload-artifact@v2
52
+ run : cargo build --release --all-features --target=x86_64-pc-windows-msvc
53
+ - uses : actions/upload-artifact@v3
43
54
with :
44
55
name : binary-windows
45
56
path : target/x86_64-pc-windows-msvc/release/gptman.exe
@@ -48,13 +59,17 @@ jobs:
48
59
runs-on : macos-latest
49
60
steps :
50
61
- name : Checkout source
51
- uses : actions/checkout@v2
62
+ uses : actions/checkout@v3
63
+ - name : Install toolchain
64
+ run : |
65
+ rustup toolchain install stable --profile minimal --no-self-update
66
+ rustup default stable
67
+ echo "Installed:"
68
+ cargo --version
69
+ rustc --version --verbose
52
70
- name : Build release (OSX)
53
- uses : actions-rs/cargo@v1
54
- with :
55
- command : build
56
- args : --release --all-features
57
- - uses : actions/upload-artifact@v2
71
+ run : cargo build --release --all-features
72
+ - uses : actions/upload-artifact@v3
58
73
with :
59
74
name : binary-osx
60
75
path : target/release/gptman
@@ -63,56 +78,28 @@ jobs:
63
78
needs : [build-linux, build-windows, build-osx-x86]
64
79
runs-on : ubuntu-latest
65
80
steps :
66
- - name : Get the version
67
- id : get_version
68
- run : echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
69
- - uses : actions/download-artifact@v2
81
+ - uses : actions/download-artifact@v3
70
82
with :
71
83
name : binary-linux
72
84
path : binary-linux
73
- - uses : actions/download-artifact@v2
85
+ - uses : actions/download-artifact@v3
74
86
with :
75
87
name : binary-windows
76
88
path : binary-windows
77
- - uses : actions/download-artifact@v2
89
+ - uses : actions/download-artifact@v3
78
90
with :
79
91
name : binary-osx
80
92
path : binary-osx
81
- - name : Create Release
82
- id : create_release
83
- uses : actions/create-release@v1
84
- env :
85
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86
- with :
87
- tag_name : ${{ github.ref }}
88
- release_name : Release ${{ github.ref }}
89
- body : gptman release ${{ steps.get_version.outputs.VERSION }}
90
- draft : false
91
- prerelease : false
92
- - name : Upload Release Asset Linux
93
- uses : actions/upload-release-asset@v1
94
- env :
95
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
96
- with :
97
- upload_url : ${{ steps.create_release.outputs.upload_url }}
98
- asset_path : binary-linux/gptman
99
- asset_name : gptman-${{ steps.get_version.outputs.VERSION }}-linux-x86_64
100
- asset_content_type : application/x-pie-executable
101
- - name : Upload Release Asset Windows
102
- uses : actions/upload-release-asset@v1
103
- env :
104
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
105
- with :
106
- upload_url : ${{ steps.create_release.outputs.upload_url }}
107
- asset_path : binary-windows/gptman.exe
108
- asset_name : gptman-${{ steps.get_version.outputs.VERSION }}-win-x86_64.exe
109
- asset_content_type : application/x-dosexec
110
- - name : Upload Release Asset OSX
111
- uses : actions/upload-release-asset@v1
112
- env :
113
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
93
+ - name : Arrange artifacts
94
+ run : |
95
+ mkdir artifacts
96
+ mv binary-linux/gptman "artifacts/gptman-${{ github.ref_name }}-linux-x86_64"
97
+ mv binary-windows/gptman.exe "artifacts/gptman-${{ github.ref_name }}-win-x86_64.exe"
98
+ mv binary-osx/gptman "artifacts/gptman-${{ github.ref_name }}-osx-x86_64"
99
+ - uses : ncipollo/release-action@v1
114
100
with :
115
- upload_url : ${{ steps.create_release.outputs.upload_url }}
116
- asset_path : binary-osx/gptman
117
- asset_name : gptman-${{ steps.get_version.outputs.VERSION }}-osx-x86_64
118
- asset_content_type : application/x-mach-binary
101
+ artifactErrorsFailBuild : true
102
+ artifacts : " artifacts/*"
103
+ body : gptman release ${{ github.ref_name }}
104
+ makeLatest : true
105
+ name : Release ${{ github.ref_name }}
0 commit comments