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.
This commit is contained in:
parent
ab362bb8c5
commit
5284d05d41
4 changed files with 10 additions and 13 deletions
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
|
|
@ -29,11 +29,8 @@ jobs:
|
||||||
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 Raylib-cs/nuget
|
||||||
|
|
||||||
- name: Restore + Install Built Package
|
- name: Restore + Install Built Package
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -46,17 +43,17 @@ jobs:
|
||||||
- name: Upload NuGet Package As Artifact
|
- name: Upload NuGet Package As Artifact
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: nuget/*
|
path: Raylib-cs/nuget/*
|
||||||
|
|
||||||
- name: Upload NuGet Package As Release
|
- name: Upload NuGet Package As Release
|
||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: nuget/*
|
files: Raylib-cs/nuget/*
|
||||||
|
|
||||||
- name: Publish to NuGet
|
- name: Publish to NuGet
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
dotnet nuget push \
|
dotnet nuget push \
|
||||||
nuget/* \
|
Raylib-cs/nuget/* \
|
||||||
--api-key ${{secrets.NUGET_API_KEY}}
|
--api-key ${{secrets.NUGET_API_KEY}}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="LocalRaylibBuild" value="./nuget" />
|
<add key="LocalRaylibBuild" value="./Raylib-cs/nuget" />
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -120,7 +120,7 @@ package (the version set by `RaylibCsVersion` in [Directory.Build.props](Directo
|
||||||
`RaylibCsForceLocalNuget`:
|
`RaylibCsForceLocalNuget`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
dotnet pack Raylib-cs -c Release -o nuget
|
dotnet pack Raylib-cs -c Release -o Raylib-cs/nuget
|
||||||
dotnet build
|
dotnet build
|
||||||
```
|
```
|
||||||
```sh
|
```sh
|
||||||
|
|
@ -130,12 +130,12 @@ dotnet run --project Examples -p:RaylibCsForceLocalNuget=true
|
||||||
dotnet test -p:RaylibCsForceLocalNuget=true
|
dotnet test -p:RaylibCsForceLocalNuget=true
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that `NuGet.config` points restore at the local `./nuget` feed, so both projects pick up the freshly packed
|
Note that `NuGet.config` points restore at the local `./Raylib-cs/nuget` feed, so both projects pick up the freshly packed
|
||||||
package. If you skip the pack step on a fresh clone, restore fails with NU1301 (the `./nuget` source
|
package. If you skip the pack step on a fresh clone, restore fails with NU1301 (the `./Raylib-cs/nuget` source
|
||||||
doesn't exist) or NU1102 (Raylib-cs not found) - running the pack command fixes both.
|
doesn't exist) or NU1102 (Raylib-cs not found) - running the pack command fixes both.
|
||||||
|
|
||||||
When iterating on the binding itself, note that NuGet caches the extracted package by version and
|
When iterating on the binding itself, note that NuGet caches the extracted package by version and
|
||||||
ignores repacks of the same version. After repacking, delete the old package from `./nuget` and clear
|
ignores repacks of the same version. After repacking, delete the old package from `./Raylib-cs/nuget` and clear
|
||||||
the cached copy (`dotnet nuget locals global-packages --clear`, or delete
|
the cached copy (`dotnet nuget locals global-packages --clear`, or delete
|
||||||
`~/.nuget/packages/raylib-cs/<version>`) before restoring again.
|
`~/.nuget/packages/raylib-cs/<version>`) before restoring again.
|
||||||
|
|
||||||
|
|
|
||||||
0
Raylib-cs/nuget/.keep
Normal file
0
Raylib-cs/nuget/.keep
Normal file
Loading…
Reference in a new issue