From 0ee678bdaa361367fa54b23bd18ebfc1f6bab682 Mon Sep 17 00:00:00 2001 From: erri120 Date: Thu, 20 Jul 2023 10:26:41 +0200 Subject: [PATCH] Add publish nuget packages workflow --- .github/workflows/publish-nuget-packages.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish-nuget-packages.yaml diff --git a/.github/workflows/publish-nuget-packages.yaml b/.github/workflows/publish-nuget-packages.yaml new file mode 100644 index 0000000..af1e5dd --- /dev/null +++ b/.github/workflows/publish-nuget-packages.yaml @@ -0,0 +1,31 @@ +name: Publish NuGet Packages + +on: + push: + tags: + - 'v*' + +jobs: + get-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.get-version.outputs.version }} + + steps: + - name: Get version + id: get-version + shell: pwsh + run: | + $version = [System.Version]::Parse("${{ github.ref_name }}".Replace('v', '')).ToString() + echo "version=$version" >> $env:GITHUB_OUTPUT + echo $version + + publish: + needs: get-version + uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/publish-nuget-packages.yaml@7153945b739384233c7b3ba188b55201514a6fa8 + with: + version: ${{ needs.get-version.outputs.version }} + use-nuget: true + use-github: false + secrets: + NUGET_API_KEY: ${{ secrets.NUGET_KEY }}