Skip to content

Commit 63cef35

Browse files
committed
feat: add GitHub Actions CI/CD workflow for multi-platform builds, tests, and NuGet package deployment
1 parent 05ddd24 commit 63cef35

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,27 @@ jobs:
7676

7777
- name: Build
7878
run: dotnet build OpenGL.Net.sln --configuration ${{ matrix.configuration }} --no-restore
79+
80+
deploy:
81+
runs-on: windows-latest
82+
needs: [build-windows, build-linux, build-macos]
83+
if: startsWith(github.ref, 'refs/tags/')
84+
steps:
85+
- uses: actions/checkout@v4
86+
87+
- name: Setup .NET
88+
uses: actions/setup-dotnet@v4
89+
with:
90+
dotnet-version: |
91+
6.0.x
92+
7.0.x
93+
8.0.x
94+
95+
- name: Restore dependencies
96+
run: dotnet restore OpenGL.Net.sln
97+
98+
- name: Pack
99+
run: dotnet pack OpenGL.Net.sln --configuration Release --no-restore --output nupkgs
100+
101+
- name: Publish to NuGet
102+
run: dotnet nuget push nupkgs\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate

0 commit comments

Comments
 (0)