Skip to content

Update dotnet-desktop.yml #7

Update dotnet-desktop.yml

Update dotnet-desktop.yml #7

Workflow file for this run

# Build the CI version and run tests
name: CI Build
on:
push:
branches:
- '**'
pull_request:
branches: [ "main" ]
env:
DOTNET_VERSION: '8.0.x'
Configuration: 'Release'
jobs:
build:
name: Build project
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set Build number
id: build-id
run: echo "BUILD_ID=${{ github.ref_name }}_$(date +'%Y%j').${{github.run_attempt}}" >> "$GITHUB_OUTPUT"
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: ♻ Restore dependencies
run: dotnet restore
- name: 👷‍♀️ Build ${{ github.ref_name }} branch ${{ steps.build-id.outputs.BUILD_ID }}
run: dotnet build --no-restore --configuration ${{ env.CONFIGURATION }}
- name: 🧪 Test
run: dotnet test --no-build --verbosity normal