From b85261d0b2701a2798b69c201a16131d8c29d979 Mon Sep 17 00:00:00 2001 From: Ben Parsons <9parsonsb@gmail.com> Date: Sat, 2 Oct 2021 21:03:13 +1000 Subject: [PATCH] Create and upload NuGet package This reverts commit 109dd2caad2369f03df34e83b27d5b0c954cbfd8. --- .github/workflows/build.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab5c05c..6c71408 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,11 +88,24 @@ jobs: source: "raylib-osx64/raylib-${{steps.get-tag.outputs.info}}_macos/lib/libraylib.dylib" target: "Raylib-cs/runtimes/osx-x64/native/libraylib.dylib" - - name: output directory - run: "ls -la ." + - id: get-nuget-version + name: Get NuGet Package Version + uses: mavrosxristoforos/get-xml-info@1.0 + with: + xml-file: "./Raylib-cs/Raylib-cs.csproj" + xpath: "//PackageVersion" - - name: 'Upload runtimes' + - name: Create NuGet Package + run: dotnet pack -c Release + + - name: Upload NuGet Package As Artifact uses: actions/upload-artifact@v2 with: - name: runtimes - path: Raylib-cs/runtimes + name: Raylib-cs.${{steps.get-nuget-version.outputs.info}}.nupkg + path: Raylib-cs/bin/Release/Raylib-cs.${{steps.get-nuget-version.outputs.info}}.nupkg + + - name: Upload NuGet Package As Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: Raylib-cs/bin/Release/Raylib-cs.${{steps.get-nuget-version.outputs.info}}.nupkg \ No newline at end of file