Skip to content

Commit 847a104

Browse files
committed
Update actions
1 parent ca75a95 commit 847a104

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ jobs:
3434
steps:
3535
# Setup environment
3636
- name: Checkout
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838

3939
- name: Setup Dotnet
4040
uses: actions/setup-dotnet@v4
4141
with:
4242
source-url: https://nuget.pkg.github.com/MonkeyModdingTroop/index.json
4343

4444
# Cache NuGet packages
45-
- uses: actions/cache@v3
45+
- uses: actions/cache@v4
4646
with:
4747
path: ~/.nuget/packages
4848
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
@@ -60,7 +60,7 @@ jobs:
6060
run: dotnet test --no-restore --no-build
6161

6262
# Publish the NuGet package(s) as an artifact, so they can be used in the following jobs
63-
- uses: actions/upload-artifact@v3
63+
- uses: actions/upload-artifact@v4
6464
with:
6565
name: nuget
6666
if-no-files-found: error
@@ -76,7 +76,7 @@ jobs:
7676
uses: actions/setup-dotnet@v4
7777

7878
# Cache NuGet packages
79-
- uses: actions/cache@v3
79+
- uses: actions/cache@v4
8080
with:
8181
path: ~/.nuget/packages
8282
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
@@ -87,7 +87,7 @@ jobs:
8787
run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global
8888

8989
# Download the NuGet package created in the previous job
90-
- uses: actions/download-artifact@v3
90+
- uses: actions/download-artifact@v4
9191
with:
9292
name: nuget
9393
path: ${{ env.NuGetDirectory }}
@@ -97,4 +97,4 @@ jobs:
9797
# If some rules are not applicable, you can disable them
9898
# using the --excluded-rules or --excluded-rule-ids option
9999
- name: Validate Package(s)
100-
run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")
100+
run: meziantou.validate-nuget-package (Get-ChildItem -Recurse "${{ env.NuGetDirectory }}/*.nupkg")

MonkeyLoader.ModTemplate/MonkeyLoader.ModTemplate.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddExtraFilesToPackage</TargetsForTfmSpecificContentInPackage>
1818
</PropertyGroup>
1919

20+
<PropertyGroup>
21+
<EnablePackageValidation>true</EnablePackageValidation>
22+
23+
<!-- Optional: Detect breaking changes from a previous stable version
24+
<PackageValidationBaselineVersion>0.1.0-beta</PackageValidationBaselineVersion> -->
25+
</PropertyGroup>
26+
2027
<Target Name="AddExtraFilesToPackage">
2128
<ItemGroup>
2229
<TfmSpecificPackageFile Include="$(ProjectDir)..\MonkeyLoader.ModTemplate.PrePatcher\bin\$(Configuration)\$(TargetFramework)\MonkeyLoader.ModTemplate.PrePatcher.*" PackagePath="lib/$(TargetFramework)/pre-patchers/" />

0 commit comments

Comments
 (0)