From 45c8152b474aed47434b62fd093ba33fc4121aa5 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 7 Apr 2024 15:04:40 +0900 Subject: [PATCH 1/4] Add org prefix to package name --- Directory.Build.props | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0af7e08..ffc4407 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,8 @@ ppy Pty Ltd ppy Pty Ltd Copyright (c) 2024 ppy Pty Ltd - SDL3-CS + ppy.SDL3-CS + ppy.SDL3-CS Automated release. MIT https://github.com/ppy/SDL3-CS From 9631ba1327fd4e859f8b71d09137346dfa20f028 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 7 Apr 2024 15:06:13 +0900 Subject: [PATCH 2/4] 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}} From ba77deb43d5e3b8f3ceb38959e1112ce97416eee Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 7 Apr 2024 15:16:32 +0900 Subject: [PATCH 3/4] Move NuGet config to final csproj --- Directory.Build.props | 11 ----------- SDL3-CS/SDL3-CS.csproj | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index ffc4407..2de660c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,15 +14,4 @@ SDL3-CS.licenseheader - - 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 - 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 + + From cea0afa404a307ccb7413cc17a758bf0d474a81e Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 7 Apr 2024 15:41:00 +0900 Subject: [PATCH 4/4] Upload as artifact --- .github/workflows/deploy.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 53b539f..17e6bf1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,7 +6,7 @@ on: - '*' jobs: - deploy: + pack: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,9 +19,14 @@ jobs: - name: Build run: dotnet build SDL3-CS.sln -c Release - - name: Build Packages + - 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 - 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}}