-
-
Notifications
You must be signed in to change notification settings - Fork 196
139 lines (112 loc) · 4.46 KB
/
compile-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Compile Linux binaries
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
- prereleased
jobs:
build-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.200
- name: Restore dependencies
run: dotnet restore -r linux-x64 --configfile GalaxyBudsClient/nuget.config GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Build x64
run: dotnet publish -r linux-x64 -o bin_linux64 -c Release -p:PublishTrimmed=true -p:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Upload artifacts
uses: actions/[email protected]
with:
name: GalaxyBudsClient_linux-amd64_portable
path: bin_linux64/GalaxyBudsClient
build-x64-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.200
- name: Restore dependencies
run: dotnet restore -r linux-musl-x64 --configfile GalaxyBudsClient/nuget.config GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Build x64 musl
run: dotnet publish -r linux-musl-x64 -o bin_linux64_musl -c Release -p:PublishTrimmed=true -p:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Upload artifacts
uses: actions/[email protected]
with:
name: GalaxyBudsClient_linux-amd64-musl_portable
path: bin_linux64_musl/GalaxyBudsClient
build-arm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.200
- name: Restore dependencies
run: dotnet restore -r linux-arm --configfile GalaxyBudsClient/nuget.config GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Build arm
run: dotnet publish -r linux-arm -o bin_linux_arm -c Release -p:PublishTrimmed=true -p:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Upload artifacts
uses: actions/[email protected]
with:
name: GalaxyBudsClient_linux-arm_portable
path: bin_linux_arm/GalaxyBudsClient
build-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.200
- name: Restore dependencies
run: dotnet restore -r linux-arm64 --configfile GalaxyBudsClient/nuget.config GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Build arm64
run: dotnet publish -r linux-arm64 -o bin_linux_arm64 -c Release -p:PublishTrimmed=true -p:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Upload artifacts
uses: actions/[email protected]
with:
name: GalaxyBudsClient_linux-arm64_portable
path: bin_linux_arm64/GalaxyBudsClient
attach-to-release:
runs-on: windows-latest
needs: [build-x64, build-x64-musl, build-arm, build-arm64]
if: github.event_name == 'release'
steps:
- name: Download setup artifact (x64)
uses: actions/download-artifact@v2
with:
name: GalaxyBudsClient_linux-amd64_portable
- name: Rename (x64)
run: ren GalaxyBudsClient GalaxyBudsClient_Linux_64bit_Portable.bin
- name: Download setup artifact (x64-musl)
uses: actions/download-artifact@v2
with:
name: GalaxyBudsClient_linux-amd64-musl_portable
- name: Rename (x64-musl)
run: ren GalaxyBudsClient GalaxyBudsClient_Linux_64bit-musl_Portable.bin
- name: Download artifact (arm)
uses: actions/download-artifact@v2
with:
name: GalaxyBudsClient_linux-arm_portable
- name: Rename (arm)
run: ren GalaxyBudsClient GalaxyBudsClient_Linux_arm_Portable.bin
- name: Download artifact (arm64)
uses: actions/download-artifact@v2
with:
name: GalaxyBudsClient_linux-arm64_portable
- name: Rename (arm64)
run: ren GalaxyBudsClient GalaxyBudsClient_Linux_arm64_Portable.bin
- uses: AButler/[email protected]
with:
files: '*.bin'
repo-token: ${{ secrets.GITHUB_TOKEN }}