From 9631ba1327fd4e859f8b71d09137346dfa20f028 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 7 Apr 2024 15:06:13 +0900 Subject: [PATCH] Add deploy workflow --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..53b539f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy + +on: + push: + tags: + - '*' + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Build + run: dotnet build SDL3-CS.sln -c Release + + - name: Build Packages + run: dotnet pack SDL3-CS/SDL3-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) + + - name: Publish tagged release to nuget.org + if: startsWith(github.ref, 'refs/tags/') + run: dotnet nuget push SDL3-CS/bin/Release/ppy.*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}