Files
Impostor/.github/workflows/ci.yml
T
miniduikboot c73a0ea044 Update to .NET 10 (#754)
* Update to .NET 10

* Bump cake to v7 and pin in ci.yml

Previously it did a GH lookup, which lead to rate limit issues

See https://github.com/cake-build/cake-action/issues/63
2026-11-15 13:04:38 +01:00

65 lines
1.6 KiB
YAML

name: CI
on:
push:
paths:
- '.github/workflows/ci.yml'
- 'src/**/**'
- 'build.cake'
pull_request:
paths:
- '.github/workflows/ci.yml'
- 'src/**/**'
- 'build.cake'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- uses: actions/cache@v6
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.x
- name: Run the Cake script
uses: cake-build/cake-action@v3
with:
verbosity: Diagnostic
cake-version: 7.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: softprops/action-gh-release@v3
if: github.ref_type == 'tag'
with:
draft: true
files: |
./build/*.zip
./build/*.tar.gz
./build/*.nupkg
./build/*.snupkg
# Use NuGet trusted publishing: https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing
- name: NuGet login
uses: NuGet/login@v1
id: login
if: github.ref_type == 'tag'
with:
user: "${{ secrets.NUGET_USER }}"
- name: Push NuGet package
if: github.ref_type == 'tag'
run: |
dotnet nuget push ./build/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}