-
Notifications
You must be signed in to change notification settings - Fork 58
78 lines (65 loc) · 2.69 KB
/
release.yml
File metadata and controls
78 lines (65 loc) · 2.69 KB
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
name: publish
on:
release:
types: 'published'
jobs:
publish:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'main'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Get Thermo packages
uses: actions/checkout@v4
with:
repository: 'thermofisherlsms/RawFileReader'
path: 'ThermoPKG'
token: ${{ secrets.GITHUB_TOKEN }}
sparse-checkout: 'Libs/NetCore/Net8/*.nupkg'
sparse-checkout-cone-mode: 'false'
- name: Add Thermo packages as NuGet source
run: |
dotnet nuget add source -n ThermoPKG `pwd`/ThermoPKG/Libs/NetCore/Net8
- name: Publish all and zip artifacts
run: |
dotnet publish --configuration Release --runtime linux-x64 main/ThermoRawFileParser.csproj --sc -o publish/linux-x64
dotnet publish --configuration Release --runtime win-x64 main/ThermoRawFileParser.csproj --sc -o publish/win-x64
dotnet publish --configuration Release --runtime osx-x64 main/ThermoRawFileParser.csproj --sc -o publish/osx-x64
dotnet publish --configuration Release --framework net8.0 main/ThermoRawFileParser.csproj -o publish/net8
cd publish/linux-x64
zip -r -q ThermoRawFileParser-${{ github.ref_name }}-linux.zip *
cd ../win-x64
zip -r -q ThermoRawFileParser-${{ github.ref_name }}-win.zip *
cd ../osx-x64
zip -r -q ThermoRawFileParser-${{ github.ref_name }}-osx.zip *
cd ../net8
zip -r -q ThermoRawFileParser-${{ github.ref_name }}-net8.zip *
- name: Upload Linux to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: publish/linux-x64/ThermoRawFileParser-${{ github.ref_name }}-linux.zip
tag: ${{ github.ref }}
- name: Upload OSX to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: publish/osx-x64/ThermoRawFileParser-${{ github.ref_name }}-osx.zip
tag: ${{ github.ref }}
- name: Upload Windows to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: publish/win-x64/ThermoRawFileParser-${{ github.ref_name }}-win.zip
tag: ${{ github.ref }}
- name: Upload framework-based to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: publish/net8/ThermoRawFileParser-${{ github.ref_name }}-net8.zip
tag: ${{ github.ref }}