Skip to content

Commit

Permalink
Merge pull request #1 from Digitalroot-Valheim/develop
Browse files Browse the repository at this point in the history
Update NuGet Packages
  • Loading branch information
Digitalroot authored Aug 2, 2021
2 parents ceac2fb + 1bdb98f commit b749392
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 8 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI
on:
push:
paths:
- 'src/**'
- '.github/workflows/**'
pull_request:
jobs:
build:
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
env:
SLN_FILE_NAME: Digitalroot.Valheim.BetterClubs.sln
NUGET_AUTH_TOKEN: ${{secrets.NUGET_PAT}}
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
source-url: https://nuget.pkg.github.com/Digitalroot-Valheim/index.json
- name: Restore packages
run: dotnet restore src/${{ env.SLN_FILE_NAME }} --nologo
- name: Build
run: dotnet build src/${{ env.SLN_FILE_NAME }} -c Release --no-restore --nologo
- name: Test
run: dotnet test src/${{ env.SLN_FILE_NAME }} -c Release --no-build -l "trx;LogFileName=test-results.trx" --nologo
- uses: actions/upload-artifact@v2
if: always()
with:
path: ./src/UnitTests/TestResults/test-results.trx
name: test-results
retention-days: 1
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: NuGet Package
on:
push:
branches:
- main # Default release branch
paths:
- 'src/**'
- '.github/workflows/**'
jobs:
deploy:
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
SLN_FILE_NAME: Digitalroot.Valheim.BetterClubs.sln
PROJ: Digitalroot.Valheim.BetterClubs
NUGET_AUTH_TOKEN: ${{secrets.NUGET_PAT}}
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
#dotnet-version: '3.1.x' # SDK Version to use.
source-url: https://nuget.pkg.github.com/Digitalroot-Valheim/index.json
- name: Check out repository code
uses: actions/checkout@v2
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Restore packages
run: dotnet restore src/${{ env.SLN_FILE_NAME }} --nologo
- name: Build
run: dotnet build src/${{ env.SLN_FILE_NAME }} -c Release --no-restore --nologo
- name: Test
run: dotnet test src/${{ env.SLN_FILE_NAME }} -c Release --no-build --nologo
- name: Create the package
run: dotnet pack src/${{ env.PROJ }}/${{ env.PROJ }}.csproj -c Release --no-restore --no-build --nologo
- name: Publish package to Digitalroot-Valheim nuget repository
run: dotnet nuget push src/${{ env.PROJ }}/bin/Release/*.nupkg --skip-duplicate
21 changes: 21 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Test Report'
on:
workflow_run:
workflows: ['CI'] # runs after CI workflow
types:
- completed
jobs:
report:
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results # artifact name
name: NUnit Tests # Name of the check run which will be created
path: '*.trx' # Path to test results (inside artifact .zip)
reporter: dotnet-trx # Format of test results
path-replace-backslashes: 'true'
list-suites: 'all'
list-tests: 'failed'
max-annotations: '50'
3 changes: 3 additions & 0 deletions src/Digitalroot.Valheim.BetterClubs.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{4DB4
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B5463D38-F4E4-44BB-877A-0465C4B96D87}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
..\.github\workflows\drafter.yml = ..\.github\workflows\drafter.yml
..\.github\workflows\publish.yml = ..\.github\workflows\publish.yml
..\.github\workflows\test-report.yml = ..\.github\workflows\test-report.yml
EndProjectSection
EndProject
Global
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\JotunnLib.2.2.0\build\JotunnLib.props" Condition="Exists('..\packages\JotunnLib.2.2.0\build\JotunnLib.props')" />
<Import Project="..\packages\JotunnLib.2.2.1\build\JotunnLib.props" Condition="Exists('..\packages\JotunnLib.2.2.1\build\JotunnLib.props')" />
<Import Project="..\packages\ILMerge.Fody.1.16.0\build\ILMerge.Fody.props" Condition="Exists('..\packages\ILMerge.Fody.1.16.0\build\ILMerge.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -38,8 +38,8 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.5.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HarmonyX.2.5.2\lib\net45\0Harmony.dll</HintPath>
<Reference Include="0Harmony, Version=2.5.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HarmonyX.2.5.3\lib\net45\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="assembly_googleanalytics, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -90,8 +90,8 @@
<HintPath>..\packages\ILMerge.Fody.1.16.0\lib\net45\ILMerge.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Jotunn, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\JotunnLib.2.2.0\lib\net462\Jotunn.dll</HintPath>
<Reference Include="Jotunn, Version=2.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\JotunnLib.2.2.1\lib\net462\Jotunn.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Mono.Cecil, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
Expand Down Expand Up @@ -404,7 +404,7 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\ILMerge.Fody.1.16.0\build\ILMerge.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.Fody.1.16.0\build\ILMerge.Fody.props'))" />
<Error Condition="!Exists('..\packages\Fody.6.5.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.5.2\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\JotunnLib.2.2.0\build\JotunnLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JotunnLib.2.2.0\build\JotunnLib.props'))" />
<Error Condition="!Exists('..\packages\JotunnLib.2.2.1\build\JotunnLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\JotunnLib.2.2.1\build\JotunnLib.props'))" />
</Target>
<Target Name="BeforeBuild" Condition="'$(Configuration)' == 'Release'">
<Message Text="BeforeBuild Called" Importance="high" />
Expand Down
4 changes: 2 additions & 2 deletions src/Digitalroot.Valheim.BetterClubs/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<package id="Digitalroot.Valheim.Common.AssemblyInfo" version="1.0.1" targetFramework="net462" />
<package id="ErrorProne.NET.CoreAnalyzers" version="0.1.2" targetFramework="net462" developmentDependency="true" />
<package id="Fody" version="6.5.2" targetFramework="net462" developmentDependency="true" />
<package id="HarmonyX" version="2.5.2" targetFramework="net462" />
<package id="HarmonyX" version="2.5.3" targetFramework="net462" />
<package id="ILMerge.Fody" version="1.16.0" targetFramework="net462" />
<package id="JotunnLib" version="2.2.0" targetFramework="net462" />
<package id="JotunnLib" version="2.2.1" targetFramework="net462" />
<package id="Mono.Cecil" version="0.11.4" targetFramework="net462" />
<package id="MonoMod" version="21.7.22.3" targetFramework="net462" />
<package id="MonoMod.RuntimeDetour" version="21.7.22.3" targetFramework="net462" />
Expand Down

0 comments on commit b749392

Please sign in to comment.