2021-06-28 21:18:33 +00:00
|
|
|
name: Upload releases
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- created
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
2021-11-10 07:03:06 +00:00
|
|
|
uses: actions/checkout@v2.4.0
|
2021-06-28 21:18:33 +00:00
|
|
|
- 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@v1.0.2
|
2021-12-15 16:41:11 +00:00
|
|
|
- name: Install llvm and clang
|
|
|
|
uses: egor-tensin/setup-clang@v1
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
platform: x86
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
target: i686-pc-windows-msvc
|
|
|
|
- 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
|
|
|
|
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=Win32
|
2021-06-28 21:18:33 +00:00
|
|
|
working-directory: ./windows
|
|
|
|
- name: Copy files to directory for installer
|
|
|
|
run: mkdir installer; cp ./Release-Full/ccextractorwinfull.exe ./installer; cp ./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
|
2021-10-08 10:26:21 +00:00
|
|
|
- name: Create portable zip
|
|
|
|
run: Compress-Archive -Path ./installer/* -DestinationPath ./CCExtractor_win_portable.zip
|
|
|
|
working-directory: ./windows
|
|
|
|
- name: Build installer
|
2021-06-28 21:18:33 +00:00
|
|
|
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@v2.0
|
|
|
|
with:
|
2021-10-08 10:26:21 +00:00
|
|
|
files: './windows/CCExtractor.msi;./windows/CCExtractor_win_portable.zip'
|
2021-06-28 21:18:33 +00:00
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-10-08 10:26:21 +00:00
|
|
|
create_linux_package:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-10 07:03:06 +00:00
|
|
|
- uses: actions/checkout@v2.4.0
|
2021-10-08 10:26:21 +00:00
|
|
|
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@v2.0
|
|
|
|
with:
|
|
|
|
files: './ccextractor_minimal.tar.gz'
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|