Skip to content

add auto release

add auto release #13

name: TimeTask CI
on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
workflow_dispatch:
inputs:
run_tests:
description: "Run unit tests (off by default to avoid unstable desktop test failures)"
required: false
default: false
type: boolean
jobs:
build:
runs-on: windows-latest
env:
Solution_Name: TimeTask.sln
Main_Project_Path: TimeTask.csproj
Build_Configuration: Release
Build_Platform: AnyCPU
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Restore main project
run: msbuild $env:Main_Project_Path /t:Restore /p:Configuration=$env:Build_Configuration /p:Platform=$env:Build_Platform
- name: Build main project
run: msbuild $env:Main_Project_Path /p:Configuration=$env:Build_Configuration /p:Platform=$env:Build_Platform /m
- name: Execute unit tests (optional)
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_tests == true }}
run: dotnet test TimeTask.Tests/TimeTask.Tests.csproj -c $env:Build_Configuration