1+ name : publish
2+
3+ on :
4+ release :
5+ types : ' published'
6+
7+ jobs :
8+ publish :
9+
10+ runs-on : ' ubuntu-latest'
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ path : ' main'
16+
17+ - name : Setup .NET
18+ uses : actions/setup-dotnet@v4
19+ with :
20+ dotnet-version : 8.0.x
21+
22+ - name : Get Thermo packages
23+ uses : actions/checkout@v4
24+ with :
25+ repository : ' thermofisherlsms/RawFileReader'
26+ path : ' ThermoPKG'
27+ token : ${{ secrets.GITHUB_TOKEN }}
28+ sparse-checkout : ' Libs/NetCore/Net8/*.nupkg'
29+ sparse-checkout-cone-mode : ' false'
30+
31+ - name : Add Thermo packages as NuGet source
32+ run : |
33+ dotnet nuget add source -n ThermoPKG `pwd`/ThermoPKG/Libs/NetCore/Net8
34+
35+ - name : Publish all
36+ run : |
37+ dotnet publish --configuration Release --runtime linux-x64 main/ThermoRawFileParser.csproj --sc -o publish/linux-x64
38+ dotnet publish --configuration Release --runtime win-x64 main/ThermoRawFileParser.csproj --sc -o publish/win-x64
39+ dotnet publish --configuration Release --runtime osx-x64 main/ThermoRawFileParser.csproj --sc -o publish/osx-x64
40+ dotnet publish --configuration Release --framework net8.0 main/ThermoRawFileParser.csproj -o publish/net8
41+
42+ - name : Zipping Linux standalone
43+ 44+ with :
45+ files : publish/linux-x64
46+ dest : ThermoRawFileParser-${{ github.ref_name }}-linux.zip
47+
48+ - name : Upload Linux to release
49+ uses : svenstaro/upload-release-action@v2
50+ with :
51+ repo_token : ${{ secrets.GITHUB_TOKEN }}
52+ file : ThermoRawFileParser-${{ github.ref_name }}-linux.zip
53+ tag : ${{ github.ref }}
54+
55+ - name : Zipping OSX standalone
56+ 57+ with :
58+ files : publish/osx-x64
59+ dest : ThermoRawFileParser-${{ github.ref_name }}-osx.zip
60+
61+ - name : Upload OSX to release
62+ uses : svenstaro/upload-release-action@v2
63+ with :
64+ repo_token : ${{ secrets.GITHUB_TOKEN }}
65+ file : ThermoRawFileParser-${{ github.ref_name }}-osx.zip
66+ tag : ${{ github.ref }}
67+
68+ - name : Zipping Windows standalone
69+ 70+ with :
71+ files : publish/win-x64
72+ dest : ThermoRawFileParser-${{ github.ref_name }}-win.zip
73+
74+ - name : Upload Windows to release
75+ uses : svenstaro/upload-release-action@v2
76+ with :
77+ repo_token : ${{ secrets.GITHUB_TOKEN }}
78+ file : ThermoRawFileParser-${{ github.ref_name }}-win.zip
79+ tag : ${{ github.ref }}
80+
81+ - name : Zipping framework-based
82+ 83+ with :
84+ files : publish/net8
85+ dest : ThermoRawFileParser-${{ github.ref_name }}-net8.zip
86+
87+ - name : Upload framework-based to release
88+ uses : svenstaro/upload-release-action@v2
89+ with :
90+ repo_token : ${{ secrets.GITHUB_TOKEN }}
91+ file : ThermoRawFileParser-${{ github.ref_name }}-net8.zip
92+ tag : ${{ github.ref }}
93+
0 commit comments