Skip to content

fix: missing license files in installer #213

fix: missing license files in installer

fix: missing license files in installer #213

Workflow file for this run

name: Build & Test
on:
workflow_call:
outputs:
version_number:
description: "Build version number"
value: ${{ jobs.build.outputs.version_number }}
push:
branches: [ master ]
paths:
- 'AutoStartConfirm/**'
- 'AutoStartConfirmLib/**'
- 'AutoStartConfirmSetup/**'
- 'AutoStartConfirmTests/**'
- '.github/workflows/**'
pull_request:
branches: [ master ]
paths:
- 'AutoStartConfirm/**'
- 'AutoStartConfirmLib/**'
- 'AutoStartConfirmSetup/**'
- 'AutoStartConfirmTests/**'
- '.github/workflows/**'
jobs:
build:
runs-on: windows-latest
outputs:
version_number: ${{ steps.get-version-number.outputs.version_number }}
steps:
- uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Setup Wix
run: dotnet tool install --global wix
- uses: actions/cache@v4
name: Restore NuGet cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet packages
run: nuget restore AutoStartConfirm.sln
- name: Install 3rd party licenses downloader
run: dotnet tool install --global dotnet-project-licenses
- name: Download 3rd party licenses
run: dotnet-project-licenses -i AutoStartConfirmLib -o AutoStartConfirmLib\Licenses -t --timeout 60 -e -c -f AutoStartConfirmLib\Licenses -u --outfile Licenses.txt
- name: Build product
run: msbuild build/Daily.targets /property:Configuration=Release
- name: Get version number
id: get-version-number
working-directory: .\build\publish\Release_FrameworkDependent_win-x64
run: |
$versionNumber=(Get-Item ".\AutoStartConfirm.exe" | Select-Object -ExpandProperty VersionInfo).FileVersion
"version_number=$versionNumber" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Restore tests
run: dotnet restore AutoStartConfirmTests\AutoStartConfirmTests.csproj
- name: Build tests
run: msbuild AutoStartConfirmTests\AutoStartConfirmTests.csproj -p:Configuration=Release -p:Platform=x64 -p:PublishReadyToRun=false
- name: Test solution
run: vstest.console.exe /Platform:x64 "AutoStartConfirmTests\bin\x64\Release\net8.0-windows10.0.18362.0\win-x64\AutoStartConfirmTests.dll"
- uses: actions/upload-artifact@v4
name: Upload artifacts
with:
name: AutoStartConfirmSetup
path: build\publish\*.msi
if-no-files-found: error