-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 1.96 KB
/
ci-plugin.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
67
68
69
70
71
72
name: 'Plugin'
on:
push:
workflow_dispatch:
permissions:
contents: write
jobs:
build-plugin:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform:
- x64
- x86
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup vcpkg
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgGitCommitId: '927006b24c3a28dfd8aa0ec5f8ce43098480a7f1'
vcpkgTriplet: '${{ matrix.platform }}-windows'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
- name: Install MSBuild integration
run: vcpkg integrate install
- name: MSBuild
run: |
msbuild `
-m `
-property:Configuration="Release" `
-property:Platform="${{ matrix.platform }}" `
-property:OutDir="${{ matrix.platform }}"
- name: Prepare Artifact
run: |
New-Item -Path Artifact -ItemType Directory
New-Item -Path Artifact/Plugins -ItemType Directory
Copy-Item -Path ${{ matrix.platform }}/*.tvtp -Destination Artifact/Plugins/
Copy-Item -Path ${{ matrix.platform }}/*.dll -Destination Artifact/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: 'TVTestRemoteController_${{ matrix.platform }}'
if-no-files-found: 'error'
path: 'Artifact/'
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
run: Compress-Archive -Path Artifact/* -DestinationPath TVTestRemoteController_${{ matrix.platform }}.zip
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'TVTestRemoteController_${{ matrix.platform }}.zip'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'