chg: Modernize CI workflow, enable SourceLink
- Bump workflow actions to latest majors (Node 24); drop deprecated softprops/action-gh-release@v1 - Trigger push builds on main instead of master - Create local nuget feed dir before pack (fixes NU1301) - Enable Microsoft.SourceLink.GitHub for debugging symbols (ref PR #340)
This commit is contained in:
parent
ccb74af7cd
commit
c99ce8edea
2 changed files with 12 additions and 5 deletions
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
|
|
@ -5,7 +5,7 @@ name: .NET
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["main"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["*"]
|
branches: ["*"]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
|
@ -19,16 +19,19 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v5
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
8.0.x
|
8.0.x
|
||||||
9.0.x
|
9.0.x
|
||||||
10.0.x
|
10.0.x
|
||||||
|
|
||||||
|
- name: Prepare local NuGet source
|
||||||
|
run: mkdir -p nuget
|
||||||
|
|
||||||
- name: Create NuGet Package
|
- name: Create NuGet Package
|
||||||
run: dotnet pack Raylib-cs -c Release --output nuget
|
run: dotnet pack Raylib-cs -c Release --output nuget
|
||||||
|
|
||||||
|
|
@ -42,12 +45,12 @@ jobs:
|
||||||
dotnet test --verbosity normal
|
dotnet test --verbosity normal
|
||||||
|
|
||||||
- name: upload NuGet Package As Artifact
|
- name: upload NuGet Package As Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: nuget/*
|
path: nuget/*
|
||||||
|
|
||||||
- name: upload NuGet Package As Release
|
- name: upload NuGet Package As Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v3
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: nuget/*
|
files: nuget/*
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@
|
||||||
<None Include="Raylib-cs.targets" Pack="true" PackagePath="buildTransitive\Raylib-cs.targets"/>
|
<None Include="Raylib-cs.targets" Pack="true" PackagePath="buildTransitive\Raylib-cs.targets"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Import Build Props -->
|
<!-- Import Build Props -->
|
||||||
<Import Project="./Build.props" Condition="Exists('./Build.props')"/>
|
<Import Project="./Build.props" Condition="Exists('./Build.props')"/>
|
||||||
<PropertyGroup Condition="'$(TargetRaylibTag)' == ''">
|
<PropertyGroup Condition="'$(TargetRaylibTag)' == ''">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue