feat: upload artefacts and push release #10
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 | |
- name: Install Linux Wails deps | |
if: runner.os == '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 Wails deps | |
if: runner.os == 'macOS' | |
run: brew install mitchellh/gon/gon | |
shell: bash | |
# Build runik | |
- name: Build Runik | |
run: wails build --platform ${{ matrix.build.platform }} -o ${{ matrix.build.name }}_${{ runner.os }} | |
# Assign perms | |
- name: Macos perms | |
if: inputs.build == 'true' && runner.os == 'macOS' | |
run: chmod +x build/bin/*/Contents/MacOS/* | |
- name: Linux perms | |
if: inputs.build == 'true' && runner.os == 'Linux' | |
run: chmod +x build/bin/* | |
# TODO: Release and upload assets | |
- name: Upload artefacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.build.name }}_${{ matrix.build.os }} | |
path: | | |
*/bin/* | |
*\bin\* | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
*/bin/* |