mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-07-08 18:06:30 +00:00
- 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 <noreply@anthropic.com>
107 lines
4.1 KiB
YAML
107 lines
4.1 KiB
YAML
name: Upload releases
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- created
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
RUSTFLAGS: -Ctarget-feature=+crt-static
|
|
VCPKG_DEFAULT_TRIPLET: x64-windows-static
|
|
VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache
|
|
VCPKG_COMMIT: ab2977be50c702126336e5088f4836060733c899
|
|
|
|
jobs:
|
|
build_windows:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v6
|
|
- name: Get the version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
|
|
shell: bash
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v2.0.0
|
|
with:
|
|
msbuild-architecture: x64
|
|
- name: Install gpac
|
|
run: choco install gpac --version 2.4.0
|
|
- name: Setup vcpkg
|
|
run: mkdir C:\vcpkg\.cache
|
|
- name: Cache vcpkg
|
|
id: cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
C:\vcpkg\.cache
|
|
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }}
|
|
- name: Build vcpkg
|
|
run: |
|
|
git clone https://github.com/microsoft/vcpkg
|
|
./vcpkg/bootstrap-vcpkg.bat
|
|
- name: Install dependencies
|
|
run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/
|
|
working-directory: windows
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
- name: Install Win 10 SDK
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: build Release-Full
|
|
env:
|
|
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib"
|
|
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
|
|
CARGO_TARGET_DIR: "..\\..\\windows"
|
|
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
|
|
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
|
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
|
|
working-directory: ./windows
|
|
- name: Copy files to directory for installer
|
|
run: mkdir installer; cp ./x64/Release-Full/ccextractorwinfull.exe ./installer; cp ./x64/Release-Full/*.dll ./installer
|
|
working-directory: ./windows
|
|
- name: install WiX
|
|
run: dotnet tool install --global wix --version 4.0.0-preview.0 && wix extension -g add WixToolset.UI.wixext
|
|
- name: Make sure WiX works
|
|
run: wix --version && wix extension -g list
|
|
- name: Download Flutter GUI
|
|
run: ((Invoke-WebRequest -UseBasicParsing https://api.github.com/repos/CCExtractor/ccextractorfluttergui/releases/latest).Content | ConvertFrom-Json).assets | ForEach-Object {if ($_.name -eq "windows.zip") { Invoke-WebRequest -UseBasicParsing -Uri $_.browser_download_url -OutFile windows.zip}}
|
|
working-directory: ./windows
|
|
- name: Display contents of dir
|
|
run: ls
|
|
working-directory: ./windows
|
|
- name: Unzip Flutter GUI
|
|
run: Expand-Archive -Path ./windows.zip -DestinationPath ./installer
|
|
working-directory: ./windows
|
|
- name: Display installer folder contents
|
|
run: Get-ChildItem -Recurse ./installer
|
|
working-directory: ./windows
|
|
- name: Create portable zip
|
|
run: Compress-Archive -Path ./installer/* -DestinationPath ./CCExtractor_win_portable.zip
|
|
working-directory: ./windows
|
|
- name: Build installer
|
|
run: wix build -ext "$HOME\.wix\extensions\WixToolset.UI.wixext\4.0.0-preview.0\tools\WixToolset.UI.wixext.dll" -d "AppVersion=${{ steps.get_version.outputs.VERSION }}.0.0" -o CCExtractor.msi installer.wxs
|
|
working-directory: ./windows
|
|
- name: Upload as asset
|
|
uses: AButler/upload-release-assets@v3.0
|
|
with:
|
|
files: './windows/CCExtractor.msi;./windows/CCExtractor_win_portable.zip'
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
create_linux_package:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
path: ./ccextractor
|
|
- name: Create .tar.gz without git and windows folders
|
|
run: tar -pczf ./ccextractor_minimal.tar.gz --exclude "ccextractor/windows" --exclude "ccextractor/.git" ccextractor
|
|
- name: Upload as asset
|
|
uses: AButler/upload-release-assets@v3.0
|
|
with:
|
|
files: './ccextractor_minimal.tar.gz'
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|