chore: upgrade builder version #21
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: Runik build | |
on: | |
push: | |
tags: | |
# Match any new tag | |
- '*' | |
env: | |
# Necessary for most environments as build failure can occur due to OOM issues | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
jobs: | |
build: | |
strategy: | |
# Failure in one platform build won't impact the others | |
fail-fast: false | |
matrix: | |
build: | |
- name: 'Runik' | |
platform: 'linux/amd64' | |
os: 'ubuntu-latest' | |
- name: 'Runik' | |
platform: 'windows/amd64' | |
os: 'windows-latest' | |
- name: 'Runik' | |
platform: 'darwin/universal' | |
os: 'macos-latest' | |
runs-on: ${{ matrix.build.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# setup go | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
# setup node | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
# install and setup wails | |
- name: Install Wails | |
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
shell: bash | |
# OS specific setup | |
- name: Install Linux deps | |
if: runner.os == 'Linux' | |
# Wails deps for linux | |
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu | |
shell: bash | |
- name: Install macOS deps | |
if: runner.os == 'macOS' | |
# Wails deps for macos | |
run: brew install mitchellh/gon/gon | |
shell: bash | |
- name: Install Windows deps | |
if: runner.os == 'macOS' | |
# install gcc so windows can compile dictutil | |
run: choco install mingw | |
shell: pwsh | |
# Build runik | |
- name: Build Runik | |
if: runner.os != 'Windows' | |
run: wails build --platform ${{ matrix.build.platform }} -o ${{ matrix.build.name }}_${{ runner.os }} | |
- name: Build Runik for windows | |
if: runner.os == 'Windows' | |
run: wails build --platform ${{ matrix.build.platform }} -o ${{ matrix.build.name }}_${{ runner.os }} -nsis | |
# Assign perms | |
- name: Apply macos perms | |
if: runner.os == 'macOS' | |
run: chmod +x build/bin/*/Contents/MacOS/* | |
- name: Apply linux perms | |
if: runner.os == 'Linux' | |
run: chmod +x build/bin/* | |
# Zip macos App package | |
- name: Zip macos universal binary | |
if: runner.os == 'macOS' | |
run: | | |
cd build/bin | |
zip -r runik_mac_universal.zip "Runik Core.app" | |
# Publish release | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
build/bin/* |