@@ -2,15 +2,14 @@ name: Build and Publish
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [ master, modified ]
66 tags :
77 - ' *'
88 pull_request :
9- branches : [ master ]
9+ branches : [ master, modified ]
1010 workflow_dispatch :
1111
1212env :
13- CHANGELOG_PATH : ./Changelog.md
1413 CODE_COVERAGE_PATH : ./Coverage.xml
1514 RELOADED_HOOKS_NUPKG_GLOB : ./source/Reloaded.Hooks/bin/Release/*.nupkg
1615 RELOADED_HOOKS_DEFINITIONS_NUPKG_GLOB : ./source/Reloaded.Hooks.Definitions/bin/Release/*.nupkg
@@ -25,31 +24,15 @@ jobs:
2524 shell : pwsh
2625
2726 steps :
28- - uses : actions/checkout@v2
27+ - uses : actions/checkout@v4
2928 with :
3029 fetch-depth : 0
3130
3231 - name : Setup .NET Core SDK
33- uses : actions/setup-dotnet@v1.9.0
32+ uses : actions/setup-dotnet@v3
3433 with :
3534 # Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
36- dotnet-version : 6.0.x
37-
38- - name : Setup .NET Core SDK 7.X
39- uses : actions/setup-dotnet@v1.9.0
40- with :
41- # Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
42- dotnet-version : 7.0.x
43- include-prerelease : true
44-
45- # Required for C#10 features.
46- - name : Setup Node.js
47- uses : actions/setup-node@v2
48- with :
49- node-version : ' 14'
50-
51- - name : Setup AutoChangelog
52- run : npm install -g auto-changelog
35+ dotnet-version : 9.0.x
5336
5437 - name : Get Dotnet Info
5538 run : dotnet --info
@@ -65,62 +48,17 @@ jobs:
6548
6649 dotnet test -f net6.0 .\source\Reloaded.Hooks.Tests.X86\Reloaded.Hooks.Tests.X86.csproj /p:AltCover=true /p:CopyLocalLockFileAssemblies="true" /p:AltCoverAttributeFilter="ExcludeFromCodeCoverageAttribute" /p:AltCoverAssemblyExcludeFilter="Reloaded.Hooks.Tests.X86|Reloaded.Hooks.Tests.X64|Reloaded.Hooks.Tests.Shared|xunit\.*" /p:AltCoverTypeFilter="xunit\.*|AltCover\.*|Reloaded\.Assembler.*" /p:AltCoverReport="../../coverage-86.xml"
6750 dotnet test -f net6.0 .\source\Reloaded.Hooks.Tests.X64\Reloaded.Hooks.Tests.X64.csproj /p:AltCover=true /p:CopyLocalLockFileAssemblies="true" /p:AltCoverAttributeFilter="ExcludeFromCodeCoverageAttribute" /p:AltCoverAssemblyExcludeFilter="Reloaded.Hooks.Tests.X86|Reloaded.Hooks.Tests.X64|Reloaded.Hooks.Tests.Shared|xunit\.*" /p:AltCoverTypeFilter="xunit\.*|AltCover\.*|Reloaded\.Assembler.*" /p:AltCoverReport="../../coverage-64.xml"
68-
69- Get-ChildItem coverage-* | Merge-OpenCover -OutputFile "$env:CODE_COVERAGE_PATH" | Out-Null
70- choco install codecov -f -y | Out-Null
71- codecov -f $env:CODE_COVERAGE_PATH
7251
73- - name : Codecov
74- # You may pin to the exact commit or the version.
75- # uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
76- uses : codecov/codecov-action@v2.1.0
77- with :
78- # Comma-separated list of files to upload
79- files : ${{ env.CODE_COVERAGE_PATH }}
80-
81- - name : Create Changelog (on Tag)
82- run : |
83- if ($env:IS_RELEASE -eq 'true')
84- {
85- auto-changelog --sort-commits date --hide-credit --template keepachangelog --commit-limit false --unreleased --starting-version "$env:RELEASE_TAG" --output "$env:CHANGELOG_PATH"
86- }
87- else
88- {
89- auto-changelog --sort-commits date --hide-credit --template keepachangelog --commit-limit false --unreleased --output "$env:CHANGELOG_PATH"
90- }
91-
9252 - name : Upload NuGet Package Artifact
93- uses : actions/upload-artifact@v2.2.4
53+ uses : actions/upload-artifact@v4
9454 with :
9555 # Artifact name
9656 name : NuGet Packages
9757 # A file, directory or wildcard pattern that describes what to upload
9858 path : |
9959 ${{ env.RELOADED_HOOKS_NUPKG_GLOB }}
10060 ${{ env.RELOADED_HOOKS_DEFINITIONS_NUPKG_GLOB }}
101-
102- - name : Upload Changelog Artifact
103- uses : actions/upload-artifact@v2.2.4
104- with :
105- # Artifact name
106- name : Changelog
107- # A file, directory or wildcard pattern that describes what to upload
108- path : ${{ env.CHANGELOG_PATH }}
109- retention-days : 0
110-
111-
112- - name : Upload to GitHub Releases
113- uses : softprops/action-gh-release@v0.1.14
114- if : env.IS_RELEASE == 'true'
115- with :
116- # Path to load note-worthy description of changes in release from
117- body_path : ${{ env.CHANGELOG_PATH }}
118- # Newline-delimited list of path globs for asset files to upload
119- files : |
120- ${{ env.RELOADED_HOOKS_NUPKG_GLOB }}
121- ${{ env.RELOADED_HOOKS_DEFINITIONS_NUPKG_GLOB }}
122- ${{ env.CHANGELOG_PATH }}
123-
61+
12462 - name : Upload to NuGet (on Tag)
12563 env :
12664 NUGET_KEY : ${{ secrets.NUGET_KEY }}
0 commit comments