-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (108 loc) · 3.85 KB
/
ReleaseNuGet.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
name: Release Dan's WPF Components
on:
release:
types: [published]
jobs:
BuildNuGet:
name: Build NuGet
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Get Latest Release
id: latest_release
uses: joutvhu/[email protected]
with:
latest: true
prerelease: true
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Generate Version
id: make_version
shell: pwsh
run: .github\utility\SetPassedVersionNumber.ps1 -latest '${{ steps.latest_release.outputs.tag_name }}'
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build --configuration Release DansWpfComponents\DansWpfComponents\DansWpfComponents.csproj
env:
pipelinePackageVersion: ${{ steps.make_version.outputs.pipelinePackageVersion }}
pipelineAssemblyVersion: ${{ steps.make_version.outputs.pipelineAssemblyVersion }}
- name: Upload NuGet artifact
uses: actions/[email protected]
with:
name: NuGet Package Files
path: |
DansWpfComponents\DansWpfComponents\bin\Release\DansWpfComponents.*.nupkg
DansWpfComponents\DansWpfComponents\bin\Release\DansWpfComponents.*.snupkg
if-no-files-found: error
ReleaseNuGetToPrivateFeed:
name: Release NuGet To Private Feed
needs: BuildNuGet
runs-on: ubuntu-latest
steps:
- name: Download NuGet artifact
uses: actions/[email protected]
with:
name: NuGet Package Files
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Release NuGet
run: dotnet nuget push *.nupkg --source https://nuget.pkg.github.com/DanJBower/index.json --api-key ${{ github.token }}
ReleaseNuGetToActualFeed:
name: Release NuGet To Actual Feed
needs: BuildNuGet
runs-on: ubuntu-latest
steps:
- name: Download NuGet artifact
uses: actions/[email protected]
with:
name: NuGet Package Files
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Release NuGet
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
PublishExe:
name: Publish Demo Executable
needs: BuildNuGet
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Get Latest Release
id: latest_release
uses: joutvhu/[email protected]
with:
latest: true
prerelease: true
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Generate Version
id: make_version
shell: pwsh
run: .github\utility\SetPassedVersionNumber.ps1 -latest '${{ steps.latest_release.outputs.tag_name }}'
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Make Demo Executable
run: dotnet publish /p:DebugType=None /p:DebugSymbols=false /p:PublishReadyToRun=true /p:PublishSingleFile=true /p:PublishReadyToRunShowWarnings=true /p:PublishTrimmed=false /p:IncludeNativeLibrariesForSelfExtract=true DansWpfComponents\DansWpfComponents.Demo\DansWpfComponents.Demo.csproj -o . -c release
env:
pipelinePackageVersion: ${{ steps.make_version.outputs.pipelinePackageVersion }}
pipelineAssemblyVersion: ${{ steps.make_version.outputs.pipelineAssemblyVersion }}
- name: Upload Demo Executable
uses: actions/[email protected]
with:
name: Demo
path: DansWpfComponents.Demo.exe
if-no-files-found: error
- name: Publish Demo Executable
uses: svenstaro/[email protected]
with:
repo_token: ${{ github.token }}
file: DansWpfComponents.Demo.exe
tag: ${{ steps.latest_release.outputs.tag_name }}