Skip to content

Output DLLs in folder #13

Output DLLs in folder

Output DLLs in folder #13

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
Solution_Path: KoenZomers.KeePass.OneDriveSync.sln
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: repo
- name: Checkout OneDrive API dependency
uses: actions/checkout@v4
with:
repository: KoenZomers/OneDriveAPI
path: OneDriveAPI
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Install KeePass
run: choco install keepass -y --no-progress
- name: Stage KeePass at expected relative reference path
run: |
$keePassExe = Get-ChildItem -Path 'C:\Program Files*','C:\ProgramData\chocolatey\lib' -Filter 'KeePass.exe' -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
if (-not $keePassExe) {
throw "KeePass.exe not found after installation"
}
# Matches the project's literal HintPath: ..\..\..\..\Program Files\KeePass Password Safe 2\KeePass.exe
$projectDir = Join-Path $env:GITHUB_WORKSPACE 'repo\KoenZomers.KeePass.OneDriveSync'
$targetDir = [System.IO.Path]::GetFullPath((Join-Path $projectDir '..\..\..\..\Program Files\KeePass Password Safe 2'))
New-Item -ItemType Directory -Force -Path $targetDir | Out-Null
Copy-Item -Path (Join-Path $keePassExe.DirectoryName '*') -Destination $targetDir -Recurse -Force
- name: Restore NuGet packages
working-directory: repo
run: nuget restore $env:Solution_Path
- name: Build solution
working-directory: repo
run: msbuild $env:Solution_Path /p:Configuration=Release /p:Platform="Any CPU" /m
- name: Package plugin output
run: |
$releaseDir = 'repo\KoenZomers.KeePass.OneDriveSync\bin\Release'
$stagingDir = 'plugin-package\KeePassOneDriveSync'
New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null
Get-ChildItem -Path $releaseDir -Include *.dll,*.pdb -Recurse | Copy-Item -Destination $stagingDir -Force
- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: KeeOneDriveSync-dll
path: plugin-package\*