-
Notifications
You must be signed in to change notification settings - Fork 19
71 lines (54 loc) · 2.4 KB
/
release.yaml
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
name: Release
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Get .net version
run: dotnet --version
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release
- name: Test (Release)
run: dotnet test -c Release --no-build --verbosity normal
- name: Nuget pack library
run: dotnet pack -c Release src/dscom/dscom.csproj
- name: Nuget push library
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET }} --source https://api.nuget.org/v3/index.json
working-directory: src/dscom/bin/Release/
- name: Nuget pack tool
run: dotnet pack -c Release src/dscom.client/dscom.client.csproj
- name: Nuget push tool
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET }} --source https://api.nuget.org/v3/index.json
working-directory: src/dscom.client/bin/Release
- name: Nuget pack build tools
run: dotnet pack -c Release src/dscom.build/dscom.build.csproj
- name: Nuget push build tools
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET }} --source https://api.nuget.org/v3/index.json
working-directory: src/dscom.build/bin/Release
- name: Publish 32Bit binary
run: dotnet publish .\src\dscom.client\dscom.client.csproj --no-self-contained -c Release -r win-x86 -f net6.0 /p:PublishSingleFile=true; copy src\dscom.client\bin\Release\net6.0\win-x86\publish\dscom.exe src\dscom.client\bin\Release\net6.0\win-x86\publish\dscom32.exe
- name: Release 32Bit binary
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: src/dscom.client/bin/Release/net6.0/win-x86/publish/dscom32.exe
- name: Publish 64Bit binary
run: dotnet publish .\src\dscom.client\dscom.client.csproj --no-self-contained -c Release -r win-x64 -f net6.0 /p:PublishSingleFile=true
- name: Release 64Bit binary
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: src/dscom.client/bin/Release/net6.0/win-x64/publish/dscom.exe