Skip to content

Commit

Permalink
Nuget build package (#427)
Browse files Browse the repository at this point in the history
* Update csproj

* Let's try that!
  • Loading branch information
Naamloos committed Feb 21, 2024
1 parent 7925111 commit 2391630
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/nuget-push.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 13 additions & 2 deletions Obsidian.API/Obsidian.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<Company>Obsidian Team</Company>
<Product>Obsidian</Product>
<Description>The plugin API for Obsidian, a Minecraft server.</Description>
<PackageProjectUrl>https://github.com/ObsidianServer/Obsidian</PackageProjectUrl>
<RepositoryUrl>https://github.com/ObsidianServer/Obsidian</RepositoryUrl>
<PackageProjectUrl>https://github.com/ObsidianMC/Obsidian</PackageProjectUrl>
<RepositoryUrl>https://github.com/ObsidianMC/Obsidian</RepositoryUrl>
<PackageTags>minecraft obsidian api plugin plugins</PackageTags>
<PackageIconUrl>https://i.imgur.com/jU1lkP4.png</PackageIconUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand All @@ -23,6 +23,9 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
<Title>Obsidian Plugin API</Title>
<PackageIcon>74374287.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -44,11 +47,19 @@
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\Users\Ryan\Downloads\74374287.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2391630

Please sign in to comment.