-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (80 loc) · 2.71 KB
/
Copy pathbuild-windows.yml
File metadata and controls
92 lines (80 loc) · 2.71 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build Windows DLL and open PR
on:
workflow_dispatch:
push:
paths:
- "c/windows/**"
- ".github/workflows/build-windows-and-pr.yml"
permissions:
contents: write
pull-requests: write
issues: write
concurrency:
group: windows-lib-${{ github.ref }}
cancel-in-progress: false
jobs:
win-x64:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up MSVC env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Configure (CMake, x64, Release)
run: >
cmake
-S c/windows
-B build
-G "Visual Studio 17 2022"
-A x64
-D CMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --config Release --parallel
- name: Stage to lib/win/x64
shell: pwsh
run: |
New-Item -ItemType Directory -Path lib/win/x64 -Force | Out-Null
Copy-Item build/dist/webview.dll lib/win/x64/
if (Test-Path build/dist/webview.lib) { Copy-Item build/dist/webview.lib lib/win/x64/ }
if (Test-Path build/dist/webview.pdb) { Copy-Item build/dist/webview.pdb lib/win/x64/ }
- name: Check if there are changes under lib/win/x64
id: diff
shell: bash
run: |
set -euo pipefail
git add -N lib/win/x64 >/dev/null 2>&1 || true
if ! git diff --quiet -- lib/win/x64; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: steps.diff.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Add/Update Windows x64 webview binaries in lib/win/x64"
title: "Windows: update lib/win/x64 (webview.dll/.lib/.pdb)"
body: |
This PR updates the Windows x64 binaries generated from c/windows (CMake).
- Built with MSVC (x64), Release
- Copied files:
- webview.dll (required)
- webview.lib (if generated)
- webview.pdb (if generated)
CI run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
branch: ci/windows-lib-${{ github.run_id }}
delete-branch: true
add-paths: |
lib/win/x64/**
labels: |
automated
windows
signoff: false
- name: No changes — nothing to PR
if: steps.diff.outputs.changed != 'true'
run: echo "No file changes under lib/win/x64. Skipping PR."