1+ name : Publish Builds
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : [ main ]
7+ release :
8+ types :
9+ - created
10+
11+ jobs :
12+ publish :
13+ name : Publish ${{ matrix.runtimeIdentifier }}
14+ runs-on : ${{ matrix.operatingSystem }}
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ include :
19+ - operatingSystem : ubuntu-24.04-arm
20+ runtimeIdentifier : linux-arm
21+ - operatingSystem : ubuntu-24.04-arm
22+ runtimeIdentifier : linux-arm64
23+ - operatingSystem : ubuntu-24.04-arm
24+ runtimeIdentifier : linux-bionic-arm64
25+ - operatingSystem : ubuntu-latest
26+ runtimeIdentifier : linux-bionic-x64
27+ - operatingSystem : ubuntu-24.04-arm
28+ runtimeIdentifier : linux-musl-arm
29+ - operatingSystem : ubuntu-24.04-arm
30+ runtimeIdentifier : linux-musl-arm64
31+ - operatingSystem : ubuntu-latest
32+ runtimeIdentifier : linux-musl-x64
33+ - operatingSystem : ubuntu-latest
34+ runtimeIdentifier : linux-x64
35+ - operatingSystem : macos-latest
36+ runtimeIdentifier : osx-arm64
37+ - operatingSystem : macos-13
38+ runtimeIdentifier : osx-x64
39+ - operatingSystem : windows-latest
40+ runtimeIdentifier : win-arm64
41+ - operatingSystem : windows-latest
42+ runtimeIdentifier : win-x64
43+ - operatingSystem : windows-latest
44+ runtimeIdentifier : win-x86
45+
46+ steps :
47+ - name : Checkout Repository
48+ uses : actions/checkout@v6
49+
50+ - name : Setup .NET
51+ uses : actions/setup-dotnet@v5
52+ with :
53+ dotnet-version : ' 10'
54+
55+ - name : Install Linux Prerequisites
56+ if : startsWith(matrix.operatingSystem, 'ubuntu')
57+ run : sudo apt-get update && sudo apt-get install -y clang zlib1g-dev
58+
59+ - name : Publish Application
60+ run : dotnet publish src/EcoFlow.Mqtt.Api/EcoFlow.Mqtt.Api.csproj -c Release -r ${{ matrix.runtimeIdentifier }} -o ./publish/${{ matrix.runtimeIdentifier }}
61+
62+ - name : Upload Build Artifact
63+ uses : actions/upload-artifact@v6
64+ with :
65+ name : EcoFlow-Mqtt-Api-${{ matrix.runtimeIdentifier }}
66+ path : ./publish/${{ matrix.runtimeIdentifier }}
0 commit comments