Skip to content

KeeAnywhere Build

KeeAnywhere Build #2

Workflow file for this run

name: KeeAnywhere Build
on:
# push:
# branches: master
workflow_dispatch:
env:
version: 2.1.0
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE
- name: Create Build Directory
run: |
mkdir build
mkdir build\bin
mkdir build\dist
- name: Restore Packages
run: nuget restore
- uses: kzrnm/get-net-sdk-project-versions-action@v2
id: get-version
with:
proj-path: KeeAnywhere\KeeAnywhere.csproj
- name: Build Solution
run: msbuild KeeAnywhere.sln /p:Configuration=Release /t:Clean,Build /fl /flp:logfile=build\build.log
- name: Copy PLGX to dist
run: copy KeeAnywhere\bin\Release\KeeAnywhere.plgx build\dist\KeeAnywhere-${{ steps.get_version.outputs.version }}.plgx
- name: ZIP artifacts to dist
run: |
xcopy KeeAnywhere\bin\Release\*.* build\bin
del build\bin\*.plgx build\bin\*.pdb build\bin\*.xml build\bin\*.config build\bin\KeePass.*
${{ env.zip }} a -tzip build\dist\KeeAnywhere-${{ steps.get_version.outputs.version }}.zip .\build\bin\*
env:
zip: packages\7-Zip.CommandLine.9.20.0\tools\7za.exe
- name: Package Chocolatey
run: |
xcopy /s /i chocolatey build\chocolatey
xcopy KeeAnywhere\bin\Release\KeeAnywhere.plgx build\chocolatey\tools
choco pack build\chocolatey\keepass-plugin-keeanywhere.nuspec --version ${{ steps.get_version.outputs.version }} --outputdirectory build\dist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: KeeAnywhere
path: "./build/dist"