-
Notifications
You must be signed in to change notification settings - Fork 88
65 lines (48 loc) · 1.7 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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"