-
Notifications
You must be signed in to change notification settings - Fork 88
66 lines (50 loc) · 1.83 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
66
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.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"