diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..17e6bf1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy + +on: + push: + tags: + - '*' + +jobs: + pack: + 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: Pack + run: dotnet pack SDL3-CS/SDL3-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: SDL3-CS + path: SDL3-CS/bin/Release/ppy.*.nupkg + + - name: Publish tagged release to nuget.org + run: dotnet nuget push SDL3-CS/bin/Release/ppy.*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} diff --git a/Directory.Build.props b/Directory.Build.props index 0af7e08..2de660c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,14 +14,4 @@ SDL3-CS.licenseheader - - ppy Pty Ltd - ppy Pty Ltd - Copyright (c) 2024 ppy Pty Ltd - SDL3-CS - Automated release. - MIT - https://github.com/ppy/SDL3-CS - https://github.com/ppy/SDL3-CS - diff --git a/SDL3-CS/SDL3-CS.csproj b/SDL3-CS/SDL3-CS.csproj index cff8be8..7ab8fb9 100644 --- a/SDL3-CS/SDL3-CS.csproj +++ b/SDL3-CS/SDL3-CS.csproj @@ -8,6 +8,18 @@ $(NoWarn);SYSLIB1054;CA1401 + + ppy Pty Ltd + ppy Pty Ltd + Copyright (c) 2024 ppy Pty Ltd + ppy.SDL3-CS + ppy.SDL3-CS + Automated release. + MIT + https://github.com/ppy/SDL3-CS + https://github.com/ppy/SDL3-CS + +