-
-
Notifications
You must be signed in to change notification settings - Fork 192
153 lines (121 loc) · 4.72 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Compile Linux binaries
on:
push:
branches: [ master, project-upgrade ]
pull_request:
branches: [ master ]
release:
types:
- published
- prereleased
workflow_dispatch:
jobs:
build-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.101
- 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:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Change Permissions
run: cd bin_linux64 && chmod +x GalaxyBudsClient
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: GalaxyBudsClient_linux-amd64_portable
path: bin_linux64/GalaxyBudsClient
build-x64-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.101
- 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:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Change Permissions
run: cd bin_linux64_musl && chmod +x GalaxyBudsClient
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: GalaxyBudsClient_linux-amd64-musl_portable
path: bin_linux64_musl/GalaxyBudsClient
build-arm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.101
- 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:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Change Permissions
run: cd bin_linux_arm && chmod +x GalaxyBudsClient
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: GalaxyBudsClient_linux-arm_portable
path: bin_linux_arm/GalaxyBudsClient
build-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.101
- 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:PublishSingleFile=true --self-contained true --no-restore GalaxyBudsClient/GalaxyBudsClient.csproj
- name: Change Permissions
run: cd bin_linux_arm64 && chmod +x GalaxyBudsClient
- name: Upload artifacts
uses: actions/upload-artifact@v4
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@v4
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@v4
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@v4
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@v4
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.GH_TOKEN }}