Release 0.8.1 #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release builds | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
attestations: write | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
katvan_version: "${{ steps.get_version.outputs.katvan_version }}" | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Determine version | |
id: get_version | |
run: echo "katvan_version=$(grep project CMakeLists.txt | head -1 | cut -d"\"" -f2)" >> $GITHUB_OUTPUT | |
create-source-tarball: | |
runs-on: ubuntu-latest | |
needs: [prepare] | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Collect tarball | |
run: | | |
mkdir dist | |
tar cfz dist/katvan-${{ needs.prepare.outputs.katvan_version }}-src.tar.gz \ | |
--transform "flags=r;s|^|katvan-${{ needs.prepare.outputs.katvan_version }}/|" \ | |
--exclude-vcs \ | |
--exclude .github \ | |
--exclude dist * | |
- name: Create attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: dist/katvan-${{ needs.prepare.outputs.katvan_version }}-src.tar.gz | |
- name: Upload tarball | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tarball | |
path: dist/katvan-${{ needs.prepare.outputs.katvan_version }}-src.tar.gz | |
if-no-files-found: error | |
build-linux-appimage: | |
runs-on: ubuntu-22.04 | |
needs: [prepare] | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.8.1 | |
arch: linux_gcc_64 | |
cache: true | |
- name: Install additional packages | |
run: sudo apt install -y libhunspell-dev libarchive-dev g++-10 libfuse2 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install AppImage tools | |
uses: miurahr/install-linuxdeploy-action@v1 | |
with: | |
plugins: qt appimage | |
- name: Configure | |
run: cmake -S . -B build -DKATVAN_DISABLE_PORTABLE=ON -DAPPIMAGE_INSTALL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | |
env: | |
CXX: g++-10 | |
- name: Build | |
run: cmake --build build -j $(nproc) | |
- name: Initialize AppDir | |
run: cmake --build build --target install DESTDIR=AppDir | |
- name: Generate AppImage | |
run: | | |
linuxdeploy-x86_64.AppImage --appdir build/AppDir --plugin qt --output appimage | |
env: | |
EXTRA_QT_MODULES: waylandcompositor;svg | |
EXTRA_PLATFORM_PLUGINS: libqwayland-generic.so;libqwayland-egl.so | |
DEPLOY_PLATFORM_THEMES: 1 | |
LINUXDEPLOY_OUTPUT_VERSION: ${{ needs.prepare.outputs.katvan_version }} | |
LDAI_UPDATE_INFORMATION: gh-releases-zsync|IgKh|katvan|latest|Katvan-*x86_64.AppImage.zsync | |
- name: Create attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: Katvan-${{ needs.prepare.outputs.katvan_version }}-x86_64.AppImage | |
- name: Upload AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AppImage | |
path: Katvan-${{ needs.prepare.outputs.katvan_version }}-x86_64.AppImage* | |
if-no-files-found: error | |
build-windows-zip: | |
runs-on: windows-2019 | |
needs: [prepare] | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.8.1 | |
cache: true | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Configure | |
run: cmake -S . -B build -DKATVAN_PORTABLE_BUILD=ON -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" | |
- name: Build | |
run: cmake --build build -j --config Release | |
- name: Create distribution | |
run: | | |
mkdir Katvan | |
cp build\Release\katvan.exe Katvan | |
cp build\Release\*.dll Katvan | |
rm Katvan\gmock.dll | |
cp COPYING Katvan\LICENSE.txt | |
windeployqt --release ` | |
--translations en,he ` | |
--skip-plugin-types generic,imageformats,networkinformation ` | |
--exclude-plugins qcertonlybackend,qopensslbackend ` | |
--no-system-d3d-compiler ` | |
--no-system-dxc-compiler ` | |
--no-opengl-sw ` | |
--no-compiler-runtime ` | |
Katvan\katvan.exe Katvan\typstdriver.dll | |
mkdir Katvan\hunspell | |
7z a katvan-${{ needs.prepare.outputs.katvan_version }}-windows-x64-portable.zip Katvan\* | |
- name: Create attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: katvan-${{ needs.prepare.outputs.katvan_version }}-windows-x64-portable.zip | |
- name: Upload distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WindowsZip | |
path: katvan-${{ needs.prepare.outputs.katvan_version }}-windows-x64-portable.zip | |
if-no-files-found: error | |
build-windows-installer: | |
runs-on: windows-2019 | |
needs: [prepare] | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 6.8.1 | |
cache: true | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Configure | |
run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" | |
- name: Build | |
run: cmake --build build -j --config Release | |
- name: Create distribution | |
run: | | |
mkdir Katvan | |
cp build\Release\katvan.exe Katvan | |
cp build\Release\*.dll Katvan | |
rm Katvan\gmock.dll | |
cp COPYING Katvan\LICENSE.txt | |
windeployqt --release ` | |
--translations en,he ` | |
--skip-plugin-types generic,imageformats,networkinformation ` | |
--exclude-plugins qcertonlybackend,qopensslbackend ` | |
--no-system-d3d-compiler ` | |
--no-system-dxc-compiler ` | |
--no-opengl-sw ` | |
Katvan\katvan.exe Katvan\typstdriver.dll | |
- name: Create installer | |
working-directory: Katvan | |
run: | | |
if (-not (Test-Path vc_redist.x64.exe)) { | |
Invoke-WebRequest "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile vc_redist.x64.exe | |
} | |
makensis.exe /NOCD /DOUTFILE=..\katvan-${{ needs.prepare.outputs.katvan_version }}-windows-x64-installer.exe ..\assets\installer.nsi | |
- name: Create attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: katvan-${{ needs.prepare.outputs.katvan_version }}-windows-x64-installer.exe | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WindowsInstaller | |
path: katvan-${{ needs.prepare.outputs.katvan_version }}-windows-x64-installer.exe | |
if-no-files-found: error | |
create-release: | |
if: github.event_name != 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
needs: [create-source-tarball, build-linux-appimage, build-windows-zip, build-windows-installer] | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Create draft release | |
run: gh release create --draft --verify-tag ${{ github.ref_name }} tarball/* AppImage/* WindowsZip/* WindowsInstaller/* | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |