7
7
jobs :
8
8
windows :
9
9
runs-on : windows-latest
10
+ timeout-minutes : 15
10
11
11
12
steps :
12
13
- uses : actions/checkout@v1
22
23
23
24
macos :
24
25
runs-on : macos-latest
26
+ timeout-minutes : 20
25
27
26
28
steps :
27
29
- uses : actions/checkout@v1
@@ -35,18 +37,18 @@ jobs:
35
37
- name : Build x86_64 release binary
36
38
run : |
37
39
source $HOME/.cargo/env
38
- cargo build --verbose --locked --release --target x86_64-apple-darwin
40
+ cargo build --verbose --locked --release --target x86_64-apple-darwin
39
41
40
- - name : Upload x86_64 artifacts
42
+ - name : Upload Intel ( x86_64) artifacts
41
43
uses : actions/upload-artifact@v1
42
44
with :
43
45
name : foreman-macos-x86_64
44
46
path : target/x86_64-apple-darwin/release/foreman
45
47
46
- - name : Build arm64 release binary
48
+ - name : Build aarch64 release binary
47
49
run : |
48
50
source $HOME/.cargo/env
49
- cargo build --verbose --locked --release --target aarch64-apple-darwin
51
+ cargo build --verbose --locked --release --target aarch64-apple-darwin
50
52
51
53
- name : Upload arm64 artifacts
52
54
uses : actions/upload-artifact@v1
56
58
57
59
linux :
58
60
runs-on : ubuntu-latest
61
+ timeout-minutes : 15
59
62
60
63
steps :
61
64
- uses : actions/checkout@v1
67
70
uses : actions/upload-artifact@v1
68
71
with :
69
72
name : foreman-linux
70
- path : target/release/foreman
73
+ path : target/release/foreman
74
+
75
+ release :
76
+ runs-on : ubuntu-latest
77
+ timeout-minutes : 15
78
+ needs : ['windows', 'macos', 'linux']
79
+ steps :
80
+ - uses : actions/checkout@v1
81
+ - name : Download artifacts
82
+ uses : actions/download-artifact@v2
83
+ with :
84
+ path : artifacts
85
+ - run : |
86
+ zip -rj foreman-win64.zip ./artifacts/foreman-win64/*
87
+ zip -rj foreman-macos-x86_64.zip ./artifacts/foreman-macos-x86_64/*
88
+ zip -rj foreman-macos-arm64.zip ./artifacts/foreman-macos-arm64/*
89
+ zip -rj foreman-linux.zip ./artifacts/foreman-linux/*
90
+ - name : Create release
91
+ id : create_release
92
+ uses : actions/create-release@v1
93
+ env :
94
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
95
+ with :
96
+ draft : true
97
+ tag_name : ${{ github.ref }}
98
+ release_name : ${{ github.ref }}
99
+
100
+ - name : Upload windows build
101
+ uses : actions/upload-release-asset@v1
102
+ env :
103
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104
+ with :
105
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
106
+ asset_path : ./foreman-win64.zip
107
+ asset_name : foreman-win64.zip
108
+ asset_content_type : application/zip
109
+
110
+ - name : Upload macos build
111
+ uses : actions/upload-release-asset@v1
112
+ env :
113
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
114
+ with :
115
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
116
+ asset_path : ./foreman-macos-x86_64.zip
117
+ asset_name : foreman-macos-x86_64.zip
118
+ asset_content_type : application/zip
119
+
120
+ - name : Upload macos build (arm64)
121
+ uses : actions/upload-release-asset@v1
122
+ env :
123
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
124
+ with :
125
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
126
+ asset_path : ./foreman-macos-arm64.zip
127
+ asset_name : foreman-macos-arm64.zip
128
+ asset_content_type : application/zip
129
+
130
+ - name : Upload linux build
131
+ uses : actions/upload-release-asset@v1
132
+ env :
133
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
134
+ with :
135
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
136
+ asset_path : ./foreman-linux.zip
137
+ asset_name : foreman-linux.zip
138
+ asset_content_type : application/zip
0 commit comments