Skip to content

Commit

Permalink
Merge branch 'master' into feat-3rdPartyLicenses
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianGalla committed Mar 30, 2024
2 parents 3588e9d + 6d153ba commit 115044a
Show file tree
Hide file tree
Showing 14 changed files with 2,284 additions and 91 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,26 @@ jobs:
uses: darenm/Setup-VSTest@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1
uses: NuGet/setup-nuget@v2

- name: Setup Wix
run: dotnet tool install --global wix

- uses: actions/cache@v3
- 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-
- uses: actions/cache@v4
name: Restore Licenses cache
with:
path: AutoStartConfirmLib/Licenses
key: ${{ runner.os }}-licenses-${{ hashFiles('AutoStartConfirmLib/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-licenses-
- name: Restore NuGet packages
run: nuget restore AutoStartConfirm.sln
Expand All @@ -60,7 +68,7 @@ jobs:
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
run: if (-not (Test-Path AutoStartConfirmLib\Licenses)) {dotnet-project-licenses -i AutoStartConfirmLib -o AutoStartConfirmLib\Licenses -t --timeout 60 -e -c -f AutoStartConfirmLib\Licenses -u --outfile Licenses.txt --log-level Verbose}

- name: Build product
run: msbuild build/Daily.targets /property:Configuration=Release
Expand All @@ -82,7 +90,7 @@ jobs:
- 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@v3
- uses: actions/upload-artifact@v4
name: Upload artifacts
with:
name: AutoStartConfirmSetup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Download build artifact
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.4
with:
name: AutoStartConfirmSetup

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -60,9 +60,9 @@ jobs:
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1
uses: NuGet/setup-nuget@v2

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Restore NuGet cache
with:
path: ~/.nuget/packages
Expand All @@ -73,8 +73,11 @@ jobs:
- name: Restore NuGet packages
run: nuget restore AutoStartConfirm.sln

- name: Create Licenses dir
run: if (-not (Test-Path Licenses)) {New-Item -ItemType Directory -Path Licenses}

- name: Build product
run: msbuild build/Daily.targets /property:Configuration=Release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
7 changes: 7 additions & 0 deletions AutoStartConfirm/AutoStartConfirm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<Product>Auto Start Confirm</Product>
<Copyright>Copyright © 2020 Christian Galla</Copyright>
<Authors>Christian Galla</Authors>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputPath>bin\x64\Debug\</OutputPath>
Expand Down Expand Up @@ -106,6 +107,11 @@
<None Include="..\LICENSE">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<DataFiles Include="..\LICENSE" />
</ItemGroup>

<ItemGroup>
<LicenseFiles Include="$(OutDir)\Licenses\**" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
Expand All @@ -114,5 +120,6 @@

<Target Name="AddPayloadsFolder" AfterTargets="Publish">
<Copy SourceFiles="@(DataFiles)" DestinationFiles="@(DataFiles->'$(PublishDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(LicenseFiles)" DestinationFiles="@(LicenseFiles->'$(PublishDir)\%(RecursiveDir)\Licenses\%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>
Loading

0 comments on commit 115044a

Please sign in to comment.