7
7
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
8
8
9
9
jobs :
10
+ set-date :
11
+ runs-on : ubuntu-latest
12
+ outputs :
13
+ date : ${{ steps.get_date.outputs.date }}
14
+ steps :
15
+ - name : Get Date in UTC+8
16
+ id : get_date
17
+ run : echo "date=$(date -u -d '8 hours' +'%Y%m%d')" >> "$GITHUB_OUTPUT"
10
18
11
19
build-win-x64-arm64 :
12
-
13
20
runs-on : windows-latest
14
-
21
+ needs : set-date
22
+
15
23
steps :
16
-
17
24
- uses : actions/checkout@v1
18
25
19
26
- name : Set up dotnet
20
27
uses : actions/setup-dotnet@v3
21
28
with :
22
29
dotnet-version : ${{ env.DOTNET_SDK_VERSION }}
23
30
24
- - run : dotnet publish BBDown -r win-x64 -c Release -o artifact-x64
25
- - run : dotnet publish BBDown -r win-arm64 -c Release -o artifact-arm64
31
+ - name : Install zip
32
+ run : choco install zip --no-progress --yes
33
+
34
+ - name : Publish [win]
35
+ run : |
36
+ dotnet publish BBDown -r win-x64 -c Release -o artifact
37
+ dotnet publish BBDown -r win-arm64 -c Release -o artifact-arm64
38
+
39
+ - name : Package [win]
40
+ run : |
41
+ cd artifact
42
+ zip -r ../BBDown_${{ needs.set-date.outputs.date }}_win-x64.zip .
43
+ cd ../artifact-arm64
44
+ zip -r ../BBDown_${{ needs.set-date.outputs.date }}_win-arm64.zip .
26
45
27
- - name : Upload Artifact[win-x64]
46
+ - name : Upload Artifact [win-x64]
28
47
uses : actions/upload-artifact@v3.1.3
29
48
with :
30
49
name : BBDown_win-x64
31
- path : artifact- x64\BBDown.exe
50
+ path : BBDown_${{ needs.set-date.outputs.date }}_win- x64.zip
32
51
33
- - name : Upload Artifact[win-arm64]
52
+ - name : Upload Artifact [win-arm64]
34
53
uses : actions/upload-artifact@v3.1.3
35
54
with :
36
55
name : BBDown_win-arm64
37
- path : artifact-arm64\BBDown.exe
38
-
56
+ path : BBDown_${{ needs.set-date.outputs.date }}_win-arm64.zip
39
57
40
58
build-linux-x64 :
41
-
42
59
runs-on : ubuntu-latest
43
60
container : ubuntu:18.04
44
-
61
+ needs : set-date
62
+
45
63
steps :
46
-
47
64
- run : apt-get update
48
- - run : apt-get install -y curl wget
65
+ - run : apt-get install -y curl wget libicu-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev zip
49
66
- uses : actions/checkout@v1
67
+
50
68
- name : Set up dotnet
51
69
uses : actions/setup-dotnet@v3
52
70
with :
53
71
dotnet-version : ${{ env.DOTNET_SDK_VERSION }}
54
- - run : apt-get install -y libicu-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev
55
- - run : dotnet publish BBDown -r linux-x64 -c Release -o artifact
56
-
57
- - name : Upload Artifact[linux-x64]
72
+
73
+ - name : Publish [linux-x64]
74
+ run : dotnet publish BBDown -r linux-x64 -c Release -o artifact
75
+
76
+ - name : Package [linux-x64]
77
+ run : |
78
+ cd artifact
79
+ zip -r ../BBDown_${{ needs.set-date.outputs.date }}_linux-x64.zip .
80
+
81
+ - name : Upload Artifact [linux-x64]
58
82
uses : actions/upload-artifact@v3.1.3
59
83
with :
60
84
name : BBDown_linux-x64
61
- path : artifact/BBDown
85
+ path : BBDown_${{ needs.set-date.outputs.date }}_linux-x64.zip
62
86
63
87
build-linux-arm64 :
64
-
65
88
runs-on : ubuntu-latest
66
89
container : mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-20220312201346-b2c2436
67
-
90
+ needs : set-date
91
+
68
92
steps :
69
-
70
93
- uses : actions/checkout@v1
71
94
- name : Set up dotnet
72
95
uses : actions/setup-dotnet@v3
73
96
with :
74
97
dotnet-version : ${{ env.DOTNET_SDK_VERSION }}
75
- - run : dotnet publish BBDown -r linux-arm64 -c Release -p:StripSymbols=true -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64 -o artifact
76
-
98
+
99
+ - name : Publish [linux-arm64]
100
+ run : dotnet publish BBDown -r linux-arm64 -c Release -p:ObjCopyName=aarch64-linux-gnu-objcopy -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64 -o artifact
101
+
102
+ - name : Package [linux-arm64]
103
+ run : |
104
+ cd artifact
105
+ zip -r ../BBDown_${{ needs.set-date.outputs.date }}_linux-arm64.zip .
106
+
77
107
- name : Upload Artifact[linux-arm64]
78
108
uses : actions/upload-artifact@v3.1.3
79
109
with :
80
110
name : BBDown_linux-arm64
81
- path : artifact/BBDown
82
-
111
+ path : BBDown_${{ needs.set-date.outputs.date }}_linux-arm64.zip
112
+
83
113
build-mac-x64-arm64 :
84
-
85
- runs-on : macOS-latest
86
-
114
+ runs-on : macos-latest
115
+ needs : set-date
116
+
87
117
steps :
88
-
89
118
- uses : actions/checkout@v1
90
-
119
+
91
120
- name : Set up dotnet
92
121
uses : actions/setup-dotnet@v3
93
122
with :
94
123
dotnet-version : ${{ env.DOTNET_SDK_VERSION }}
95
- - run : dotnet publish BBDown -r osx-arm64 -c Release -o artifact-arm64
96
- - run : dotnet publish BBDown -r osx-x64 -c Release -o artifact-x64
97
124
98
-
99
- - name : Upload Artifact[osx-x64]
125
+ - name : Publish [osx]
126
+ run : |
127
+ dotnet publish BBDown -r osx-x64 -c Release -o artifact
128
+ dotnet publish BBDown -r osx-arm64 -c Release -o artifact-arm64
129
+
130
+ - name : Package [osx]
131
+ run : |
132
+ cd artifact
133
+ zip -r ../BBDown_${{ needs.set-date.outputs.date }}_osx-x64.zip . -x "*.dSYM/*"
134
+ cd ../artifact-arm64
135
+ zip -r ../BBDown_${{ needs.set-date.outputs.date }}_osx-arm64.zip . -x "*.dSYM/*"
136
+
137
+ - name : Upload Artifact [osx-x64]
100
138
uses : actions/upload-artifact@v3.1.3
101
139
with :
102
140
name : BBDown_osx-x64
103
- path : artifact- x64/BBDown
141
+ path : BBDown_${{ needs.set-date.outputs.date }}_osx- x64.zip
104
142
105
- - name : Upload Artifact[osx-arm64]
143
+ - name : Upload Artifact [osx-arm64]
106
144
uses : actions/upload-artifact@v3.1.3
107
145
with :
108
146
name : BBDown_osx-arm64
109
- path : artifact- arm64/BBDown
147
+ path : BBDown_${{ needs.set-date.outputs.date }}_osx- arm64.zip
0 commit comments