From 239163012036f801b72c7feba9feec827a7083e7 Mon Sep 17 00:00:00 2001 From: Ryan de Jonge Date: Wed, 21 Feb 2024 01:11:43 +0100 Subject: [PATCH] Nuget build package (#427) * Update csproj * Let's try that! --- .github/workflows/nuget-push.yml | 37 ++++++++++++++++++++++++++++++++ Obsidian.API/Obsidian.API.csproj | 15 +++++++++++-- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/nuget-push.yml diff --git a/.github/workflows/nuget-push.yml b/.github/workflows/nuget-push.yml new file mode 100644 index 00000000..1f4b1077 --- /dev/null +++ b/.github/workflows/nuget-push.yml @@ -0,0 +1,37 @@ +name: Nuget + +on: + push: + branches: [ "master" ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + +env: + DOTNET_NOLOGO: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1 + +jobs: + nuget-publish: + name: Package Commit + runs-on: ubuntu-latest + needs: dotnet # Only pack and publish if build succeeds. + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 8 + 7 + - name: Pack n Push + run: | + cd Obsidian.API + dotnet build -c Release -p:SourceRevisionId=${{ github.sha }} -p:Nightly=${{ github.run_number }} + dotnet pack -c Release -o build -p:SourceRevisionId=${{ github.sha }} + dotnet nuget push "build/*" --skip-duplicate -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json \ No newline at end of file diff --git a/Obsidian.API/Obsidian.API.csproj b/Obsidian.API/Obsidian.API.csproj index 8ee0c53a..f54cb090 100644 --- a/Obsidian.API/Obsidian.API.csproj +++ b/Obsidian.API/Obsidian.API.csproj @@ -12,8 +12,8 @@ Obsidian Team Obsidian The plugin API for Obsidian, a Minecraft server. - https://github.com/ObsidianServer/Obsidian - https://github.com/ObsidianServer/Obsidian + https://github.com/ObsidianMC/Obsidian + https://github.com/ObsidianMC/Obsidian minecraft obsidian api plugin plugins https://i.imgur.com/jU1lkP4.png LICENSE @@ -23,6 +23,9 @@ true true Generated + Obsidian Plugin API + 74374287.png + README.md @@ -44,11 +47,19 @@ + + True + \ + True + + True + \ +