8.3.0 #212
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
env: | |
# Disable the .NET logo in the console output. | |
# DOTNET_NOLOGO: true | |
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build. | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# Disable sending .NET CLI telemetry to Microsoft. | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
# Set the build number in MinVer. | |
MINVERBUILDMETADATA: build.${{github.run_number}} | |
jobs: | |
build: | |
name: Build-${{matrix.os}} | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- name: configure_java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: validate java config | |
shell: powershell | |
run: | | |
java --version | |
echo $ENV:JAVA_HOME | |
- name: "Setup .NET SDK" | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.401' | |
- name: "Ensure workloads" # https://github.com/actions/runner/issues/3578 | |
run: dotnet workload install maui --version 8.0.402 | |
shell: pwsh | |
- name: "Dotnet Tool Restore" | |
run: dotnet tool restore | |
shell: pwsh | |
- name: "Dotnet Cake Build" | |
run: dotnet cake --target=Build | |
shell: pwsh | |
- name: "Dotnet Cake Test" | |
run: dotnet cake --target=Test | |
shell: pwsh | |
- name: "Dotnet Cake Pack" | |
run: dotnet cake --target=Pack | |
shell: pwsh | |
- name: "Publish Artefacts" | |
uses: actions/[email protected] | |
with: | |
name: ${{matrix.os}} | |
path: "./Artefacts" | |
- name: "Publish Binlog" | |
uses: actions/[email protected] | |
with: | |
name: ${{matrix.os}}-binlog | |
path: "./Binlog" | |
push-github-packages: | |
name: "Push GitHub Packages" | |
needs: build | |
if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
environment: | |
name: "GitHub Packages" | |
url: https://github.com/nalu-development/nalu/packages | |
permissions: | |
packages: write | |
runs-on: windows-2019 | |
steps: | |
- name: "Download Artefact" | |
uses: actions/[email protected] | |
with: | |
name: "windows-2019" | |
- name: "Dotnet NuGet Add Source" | |
run: dotnet nuget add source https://nuget.pkg.github.com/nalu-development/index.json --name GitHub --username albyrock87 --password ${{secrets.GITHUB_TOKEN}} | |
shell: pwsh | |
- name: "Dotnet NuGet Push" | |
run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate | |
shell: pwsh | |
push-nuget: | |
name: "Push NuGet Packages" | |
needs: build | |
if: github.event_name == 'release' | |
environment: | |
name: "NuGet" | |
url: https://www.nuget.org/packages/Nalu | |
runs-on: windows-2019 | |
steps: | |
- name: "Download Artefact" | |
uses: actions/[email protected] | |
with: | |
name: "windows-2019" | |
- name: "Dotnet NuGet Push" | |
run: | | |
Get-ChildItem .\ -Filter *.nupkg | | |
Where-Object { !$_.Name.Contains('preview') } | | |
ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} } | |
shell: pwsh |