From 5ba776e40a662e8abc0f8f23306bdcdea9f4e5ba Mon Sep 17 00:00:00 2001 From: Nicholas Dunnaway Date: Mon, 13 Mar 2023 22:27:41 -0700 Subject: [PATCH] Added worlflow and missing asset file. --- .github/workflows/discord.yml | 16 +++++++++ .github/workflows/nuget.autoupdate.yml | 19 +++++++++++ .github/workflows/release.yml | 34 +++++++++++++++++++ src/Digitalroot.Valheim.GoldBars.sln | 26 +++++++++++++- .../Digitalroot.Valheim.GoldBars.csproj | 8 ++++- src/Digitalroot.Valheim.GoldBars/Main.cs | 2 +- src/Digitalroot.Valheim.GoldBars/MetaData.cs | 2 +- 7 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/discord.yml create mode 100644 .github/workflows/nuget.autoupdate.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml new file mode 100644 index 0000000..b2ed5b9 --- /dev/null +++ b/.github/workflows/discord.yml @@ -0,0 +1,16 @@ +name: Discord Webhook + +on: + push: + branches: [ "main" ] # Default release branch + paths: + - 'src/**' + - '.github/workflows/**' + +jobs: + discord: + uses: Digitalroot-Valheim/.github/.github/workflows/discord.yml@main + with: + repo_name: ${{ github.event.repository.name }} + secrets: + webhook_url: ${{ secrets.VALHEIM_DISCORD_TITANS_WEBHOOK_URL }} diff --git a/.github/workflows/nuget.autoupdate.yml b/.github/workflows/nuget.autoupdate.yml new file mode 100644 index 0000000..c14a309 --- /dev/null +++ b/.github/workflows/nuget.autoupdate.yml @@ -0,0 +1,19 @@ +name: Automated NuGet Dependency Updates + +concurrency: ci-${{ github.ref }} + +on: + workflow_dispatch: + + schedule: + - cron: "0 10 * * *" + +env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + +jobs: + call-workflow-nuget-autoupdate: + uses: Digitalroot-Valheim/.github/.github/workflows/nuget.autoupdate.yml@main + secrets: + github-pat: ${{ secrets.AUTOMATED_DEPENDENCY_UPDATES_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..08f8039 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +concurrency: ci-${{ github.ref }} + +on: + workflow_dispatch: + + push: + branches: [ main ] # Default release branch + paths-ignore: + - '.github/**' + - 'docs/**' + - '**/.ts/**' + - '**/.nx/**' + +env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + +jobs: + call-workflow-nuget-release: + uses: Digitalroot-Valheim/.github/.github/workflows/nuget.release.yml@main + secrets: + aws-access-key-id: ${{ secrets.NUGET_S3_REPO_KEY_ID }} + aws-secret-access-key: ${{ secrets.NUGET_S3_REPO_KEY_SECRET }} + nexus-api-key: ${{ secrets.NEXUS_API_KEY }} + nexus-cookie-nxid-header: ${{ secrets.NEXUS_COOKIE_HEADER_NEXUSID }} + nexus-cookie-sid-header: ${{ secrets.NEXUS_COOKIE_HEADER_SID_DEVELOP }} + with: + sln-file-name: Digitalroot.Valheim.GoldBars + proj-file-name: Digitalroot.Valheim.GoldBars + is-nuget-package: false + nexus-enable-upload: true + nexus-mod-id: 1448 diff --git a/src/Digitalroot.Valheim.GoldBars.sln b/src/Digitalroot.Valheim.GoldBars.sln index 096eb26..8cbbe96 100644 --- a/src/Digitalroot.Valheim.GoldBars.sln +++ b/src/Digitalroot.Valheim.GoldBars.sln @@ -5,7 +5,28 @@ VisualStudioVersion = 17.3.32922.545 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Digitalroot.Valheim.GoldBars", "Digitalroot.Valheim.GoldBars\Digitalroot.Valheim.GoldBars.csproj", "{77751278-A982-4C07-8DA2-A4F42F56418D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{C341045F-D03F-4606-B2AF-39FE660F28A1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{C341045F-D03F-4606-B2AF-39FE660F28A1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{4F49B7C6-D501-4897-A06F-BEA9BFBA1328}" + ProjectSection(SolutionItems) = preProject + ..\docs\README.md = ..\docs\README.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{5AA8DAEE-F2B5-4435-AACD-C0F508639A1F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{A75B7401-5856-4A36-8B75-A1BFADB14375}" + ProjectSection(SolutionItems) = preProject + ..\.github\workflows\discord.yml = ..\.github\workflows\discord.yml + ..\.github\workflows\nuget.autoupdate.yml = ..\.github\workflows\nuget.autoupdate.yml + ..\.github\workflows\release.yml = ..\.github\workflows\release.yml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5AB066DB-222F-4469-97EE-C796352B13E4}" + ProjectSection(SolutionItems) = preProject + ..\.gitattributes = ..\.gitattributes + ..\.gitignore = ..\.gitignore + ..\LICENSE = ..\LICENSE + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -30,6 +51,9 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A75B7401-5856-4A36-8B75-A1BFADB14375} = {5AA8DAEE-F2B5-4435-AACD-C0F508639A1F} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {480EA9E5-CA04-4E20-A612-8A414D6E02FA} EndGlobalSection diff --git a/src/Digitalroot.Valheim.GoldBars/Digitalroot.Valheim.GoldBars.csproj b/src/Digitalroot.Valheim.GoldBars/Digitalroot.Valheim.GoldBars.csproj index a824143..e59cf15 100644 --- a/src/Digitalroot.Valheim.GoldBars/Digitalroot.Valheim.GoldBars.csproj +++ b/src/Digitalroot.Valheim.GoldBars/Digitalroot.Valheim.GoldBars.csproj @@ -27,7 +27,7 @@ https://nuget.bepinex.dev/v3/index.json; https://digitalroot-valheim-nuget.s3.us-west-2.amazonaws.com/index.json - 1.2.2 + 0.0.1 Debug;Release;DebugNoDeploy @@ -76,4 +76,10 @@ + + + PreserveNewest + + + diff --git a/src/Digitalroot.Valheim.GoldBars/Main.cs b/src/Digitalroot.Valheim.GoldBars/Main.cs index 593bb3d..691f2af 100644 --- a/src/Digitalroot.Valheim.GoldBars/Main.cs +++ b/src/Digitalroot.Valheim.GoldBars/Main.cs @@ -14,7 +14,7 @@ namespace Digitalroot.Valheim.GoldBars { [BepInPlugin(Guid, Name, Version)] - [BepInDependency(Jotunn.Main.ModGuid, "2.9.0")] + [BepInDependency(Jotunn.Main.ModGuid, "2.10.0")] [NetworkCompatibility(CompatibilityLevel.EveryoneMustHaveMod, VersionStrictness.Minor)] [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] public partial class Main : BaseUnityPlugin, ITraceableLogging diff --git a/src/Digitalroot.Valheim.GoldBars/MetaData.cs b/src/Digitalroot.Valheim.GoldBars/MetaData.cs index 874071b..bf4232b 100644 --- a/src/Digitalroot.Valheim.GoldBars/MetaData.cs +++ b/src/Digitalroot.Valheim.GoldBars/MetaData.cs @@ -5,7 +5,7 @@ namespace Digitalroot.Valheim.GoldBars [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] public partial class Main { - public const string Version = "1.2.1"; + public const string Version = "0.0.1"; public const string Name = "Digitalroot GoldBars"; public const string Guid = "digitalroot.mods.GoldBars"; public const string Namespace = "Digitalroot.Valheim" + nameof(GoldBars);