Skip to content

Commit f9ebfd2

Browse files
cfsmp3claude
andcommitted
fix(ci): Add vcpkg setup and fix permissions in release workflow
- Add permissions: contents: write for upload-release-assets - Add vcpkg environment variables and setup steps from build_windows.yml - Add gpac installation - Add vcpkg clone, bootstrap, and dependency installation - Add VCPKG_ROOT env var to build step - Change runner to windows-2022 to match build workflow - Add msbuild-architecture: x64 - Remove redundant llvm/clang setup (pre-installed on runner) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 9f670de commit f9ebfd2

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ on:
55
types:
66
- created
77

8+
permissions:
9+
contents: write
10+
11+
env:
12+
RUSTFLAGS: -Ctarget-feature=+crt-static
13+
VCPKG_DEFAULT_TRIPLET: x64-windows-static
14+
VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache
15+
VCPKG_COMMIT: ab2977be50c702126336e5088f4836060733c899
16+
817
jobs:
918
build_windows:
10-
runs-on: windows-latest
19+
runs-on: windows-2022
1120
steps:
1221
- name: Check out repository
1322
uses: actions/checkout@v6
@@ -17,11 +26,26 @@ jobs:
1726
shell: bash
1827
- name: Setup MSBuild.exe
1928
uses: microsoft/[email protected]
20-
- name: Install llvm and clang
21-
uses: egor-tensin/setup-clang@v1
2229
with:
23-
version: latest
24-
platform: x64
30+
msbuild-architecture: x64
31+
- name: Install gpac
32+
run: choco install gpac --version 2.4.0
33+
- name: Setup vcpkg
34+
run: mkdir C:\vcpkg\.cache
35+
- name: Cache vcpkg
36+
id: cache
37+
uses: actions/cache@v5
38+
with:
39+
path: |
40+
C:\vcpkg\.cache
41+
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }}
42+
- name: Build vcpkg
43+
run: |
44+
git clone https://github.com/microsoft/vcpkg
45+
./vcpkg/bootstrap-vcpkg.bat
46+
- name: Install dependencies
47+
run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/
48+
working-directory: windows
2549
- uses: actions-rs/toolchain@v1
2650
with:
2751
toolchain: stable
@@ -34,6 +58,7 @@ jobs:
3458
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
3559
CARGO_TARGET_DIR: "..\\..\\windows"
3660
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
61+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
3762
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
3863
working-directory: ./windows
3964
- name: Copy files to directory for installer
@@ -65,7 +90,7 @@ jobs:
6590
uses: AButler/[email protected]
6691
with:
6792
files: './windows/CCExtractor.msi;./windows/CCExtractor_win_portable.zip'
68-
repo-token: ${{ secrets.GITHUB_TOKEN }}
93+
repo-token: ${{ secrets.GITHUB_TOKEN }}
6994
create_linux_package:
7095
runs-on: ubuntu-latest
7196
steps:

0 commit comments

Comments
 (0)