Skip to content

KeeAnywhere Build

KeeAnywhere Build #5

Workflow file for this run

name: KeeAnywhere Build
on:
# push:
# branches: master
workflow_dispatch:
env:
version: 2.1.0
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Setup 7zip
run: choco install 7zip.portable
- 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-${{ env.version }}.plgx
- name: ZIP artifacts to dist
working-directory: KeeAnywhere\bin\Release
run: 7za a -tzip ..\..\..\build\dist\KeeAnywhere-${{ env.version }}.zip *.* -r -x!*.plgx -x!*.pdb -x!*.xml -x!*.config -x!KeePass.*
- 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 ${{ env.version }} --outputdirectory build\dist
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: KeeAnywhere
path: "./build/dist"