Skip to content

finish act with win only setup #19

finish act with win only setup

finish act with win only setup #19

Workflow file for this run

name: Build and upload release
on:
push:
tags:
- '**'
jobs:
release-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install SDL2
run: sudo apt install -y libsdl2-dev
- name: Build kalast
run: cargo build -r && strip target/release/kalast
- name: Build examples
run: cargo build -r --example viewer-picker && strip target/release/examples/viewer-picker
- name: Make bundle
run: |
mkdir -p bin/ubuntu
cp -r examples bin/ubuntu
cp target/release/kalast bin/ubuntu
cp target/release/examples/viewer-picker bin/ubuntu/examples/viewer-picker
cd bin/ubuntu
cp -r examples/thermal/cfg .
tar cvzf kalast-${{ github.ref_name }}-ubuntu.tar.gz *
mv kalast-${{ github.ref_name }}-ubuntu.tar.gz ..
- name: Release
uses: softprops/action-gh-release@v1
with:
files: bin/kalast-${{ github.ref_name }}-ubuntu.tar.gz
prerelease: true
release-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install SDL2
run: brew install SDL2
- name: Build kalast
run: cargo build -r && strip target/release/kalast
- name: Build examples
run: cargo build -r --example viewer-picker && strip target/release/examples/viewer-picker
- name: Make bundle
run: |
mkdir -p bin/macos
cp -r examples bin/macos
cp target/release/kalast bin/macos
cp target/release/examples/viewer-picker bin/macos/examples/viewer-picker
cd bin/macos
cp -r examples/thermal/cfg .
tar cvzf kalast-${{ github.ref_name }}-macos.tar.gz *
mv kalast-${{ github.ref_name }}-macos.tar.gz ..
- name: Release
uses: softprops/action-gh-release@v1
with:
files: bin/kalast-${{ github.ref_name }}-macos.tar.gz
prerelease: true
release-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Use SDL2 from repo/include/win
run: |
cp include/win/SDL2.dll .
cp include/win/SDL2.lib .
- name: Build kalast
run: cargo build -r
- name: Build examples
run: cargo build -r --example viewer-picker
- name: Make bundle
run: |
mkdir -p bin/win
cp -r examples bin/win
cp target/release/kalast.exe bin/win
cp target/release/examples/viewer-picker.exe bin/win/examples/viewer-picker
mv SDL2.dll bin/win
mv SDL2.lib bin/win
cp include/kalast.ico bin/win
cp include/preferences.yaml bin/win
cp README.md bin/win
cd bin/win
cp -r examples/thermal/cfg .
Compress-Archive * kalast-${{ github.ref_name }}-win.zip
mv kalast-${{ github.ref_name }}-win.zip ..
- name: Compile installer with Inno
run: cd bin && iscc ./installer.iss
- name: Release
uses: softprops/action-gh-release@v1
with:
files: bin/setup-kalast-${{ github.ref_name }}.exe
prerelease: true