Watch
2
0
Fork
You've already forked raylib-cs
0
raylib-cs/.github/workflows/build.yml
Chris Dill 5284d05d41 Move local nuget feed to Raylib-cs/nuget and track with .keep
Moved for organisation and using .keep so the local nuget feed can be optional.
2026-08-22 09:05:32 +01:00

59 lines
1.4 KiB
YAML

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
paths-ignore:
- "README.md"
- ".github/ISSUE_TEMPLATE/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Create NuGet Package
run: dotnet pack Raylib-cs -c Release --output Raylib-cs/nuget
- name: Restore + Install Built Package
run: |
dotnet restore
- name: Run Tests
run: |
dotnet test --verbosity normal
- name: Upload NuGet Package As Artifact
uses: actions/upload-artifact@v7
with:
path: Raylib-cs/nuget/*
- name: Upload NuGet Package As Release
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/')
with:
files: Raylib-cs/nuget/*
- name: Publish to NuGet
if: startsWith(github.ref, 'refs/tags/')
run: |
dotnet nuget push \
Raylib-cs/nuget/* \
--api-key ${{secrets.NUGET_API_KEY}}