Skip to content

ci: bump remaining cake packages #24

ci: bump remaining cake packages

ci: bump remaining cake packages #24

Workflow file for this run

name: CI
on:
push:
branches:
- main
- 'hotfix/*'
- 'release/*'
- 'develop'
paths:
- '**'
pull_request:
branches:
- develop
paths:
- '**'
env:
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
ENABLED_DIAGNOSTICS: ${{ secrets.ENABLED_DIAGNOSTICS }}
jobs:
prepare:
name: Prepare
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: 'Setup .NET 8.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
-
name: 'Setup .NET 6.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
-
name: Cache Cake Frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
build:
name: Build
needs: [prepare]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Fetch History for All Tags and Branches
run: git fetch --prune --unshallow
-
name: 'Setup .NET 8.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
-
name: 'Setup .NET 6.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
-
name: Use Cached Cake Frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use Cached Cake Tools
id: cache-tools
uses: actions/cache@v4
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: '[Build]'
shell: pwsh
run: dotnet run/build.dll --target=Package
-
name: Upload NuGet Packages
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
-
name: Upload Framework-Dependent Packages
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: framework-dependent
path: ${{ github.workspace }}/artifacts/packages/framework-dependent/*.tar.gz
-
name: Upload Native Packages
uses: actions/upload-artifact@v4
with:
name: native-${{ runner.os }}
path: ${{ github.workspace }}/artifacts/packages/native/*.tar.gz
unit_test:
name: 'Unit Test'
needs: [prepare]
runs-on: ${{ matrix.os }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
targetFramework: [net8.0, net6.0]
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Fetch History for All Tags and Branches
run: git fetch --prune --unshallow
-
name: 'Setup .NET 8.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
-
name: 'Setup .NET 6.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
-
name: Use Cached Cake Frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use Cached Cake Tools
id: cache-tools
uses: actions/cache@v4
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: '[Unit Test]'
shell: pwsh
run: dotnet run/build.dll --target=Test --dotnet_target=${{ matrix.targetFramework }}
publish:
name: Publish
needs: [build, unit_test]
runs-on: ubuntu-latest
strategy:
matrix:
taskName: [NuGet]
fail-fast: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Fetch History for All Tags and Branches
run: git fetch --prune --unshallow
-
name: 'Setup .NET 8.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
-
name: 'Setup .NET 6.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
-
name: Use Cached Cake Frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use Cached Cake Tools
id: cache-tools
uses: actions/cache@v4
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Download NuGet Packages
uses: actions/download-artifact@v4
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
-
name: '[Publish]'
shell: pwsh
run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }}
release:
name: Release
needs: [publish]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Fetch History for All Tags and Branches
run: git fetch --prune --unshallow
-
name: 'Setup .NET 8.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
-
name: 'Setup .NET 6.0.x SDK'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
-
name: Use Cached Cake Frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Use Cached Cake Tools
id: cache-tools
uses: actions/cache@v4
with:
path: tools
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
-
name: Download Framework Dependent Packages
uses: actions/download-artifact@v4
with:
name: framework-dependent
path: ${{ github.workspace }}/artifacts/packages/framework-dependent
-
name: Download Native Linux Packages
uses: actions/download-artifact@v4
with:
name: native-Linux
path: ${{ github.workspace }}/artifacts/packages/native
-
name: Download Native Windows Packages
uses: actions/download-artifact@v4
with:
name: native-Windows
path: ${{ github.workspace }}/artifacts/packages/native
-
name: Download Native macOS Packages
uses: actions/download-artifact@v4
with:
name: native-macOS
path: ${{ github.workspace }}/artifacts/packages/native
-
name: '[Release]'
shell: pwsh
run: dotnet run/release.dll --target=PublishRelease