Skip to content

Bumped version number to v0.13.1 #41

Bumped version number to v0.13.1

Bumped version number to v0.13.1 #41

Workflow file for this run

name: Build release
on:
push:
tags:
- '*'
permissions:
contents: write
discussions: write
env:
NODE_OPTIONS: '--max-old-space-size=4096'
BUILD: 'true'
WORKING_DIRECTORY: '.'
WEBVIEW2: 'browser'
jobs:
build:
strategy:
# Failure in one platform build won't impact the others
fail-fast: false
matrix:
build:
- name: 'spinup'
platform: 'linux/amd64'
os: 'ubuntu-22.04'
- name: 'spinup'
platform: 'darwin/universal'
os: 'macos-latest'
# - name: 'Spinup'
# platform: 'windows/amd64'
# os: 'windows-latest'
runs-on: ${{ matrix.build.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# Setup and configure Go
- name: Setup Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version: '1.23'
- run: go version
shell: bash
# Setup pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
# Setup and configure NodeJS
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: './frontend/pnpm-lock.yaml'
# install Wails
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
shell: bash
- name: Update Ubuntu package list
if: runner.os == 'Linux'
run: sudo apt-get update
shell: bash
- name: Install Ubuntu Wails deps
if: runner.os == 'Linux'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-3-0 libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev gcc-aarch64-linux-gnu rpm
- name: Install macOS Wails deps
if: runner.os == 'macOS'
run: brew install mitchellh/gon/gon
shell: bash
# Building step
- name: Build Linux App
if: runner.os == 'Linux'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
SPINUP_VERSION=$(cat ./common/.version | sed 's/^v//')
sed -i.bak "s/{{version}}/${SPINUP_VERSION}/g" wails.json && rm wails.json.bak
wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -o ${{ matrix.build.name }}-${SPINUP_VERSION} -tags webkit2_40
wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -o ${{ matrix.build.name }}-${SPINUP_VERSION}-ubuntu24.04 -tags webkit2_41
shell: bash
- name: Build macOs App
if: runner.os == 'macOS'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
SPINUP_VERSION=$(cat ./common/.version | sed 's/^v//')
sed -i.bak "s/{{version}}/${SPINUP_VERSION}/g" wails.json && rm wails.json.bak
wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -o ${{ matrix.build.name }}
shell: bash
- name: Build Windows App + Installer
if: runner.os == 'Windows'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
SPINUP_VERSION=$(cat ./common/.version | sed 's/^v//')
sed -i "s/{{version}}/${SPINUP_VERSION}/g" wails.json
wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -nsis -o ${{ matrix.build.name }}-${SPINUP_VERSION}
shell: bash
# Add permissions to the binary
- name: Add Linux perms
if: runner.os == 'Linux'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: chmod +x build/bin/*
shell: bash
- name: Add macOS perms
if: runner.os == 'macOS'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: chmod +x build/bin/*/Contents/MacOS/*
shell: bash
# Generate icons for Linux and macOS
- name: Load cached icons
# if: runner.os == 'Linux' || runner.os == 'macOS'
if: runner.os == 'Linux'
id: cache-icons
uses: actions/cache@v4
with:
key: ${{ runner.os }}-icons-${{ hashFiles('images/icon-large.png') }}
path: |
build/unix/usr/share/icons
build/unix/usr/share/pixmaps
- name: Generate icons
# if: (runner.os == 'Linux' || runner.os == 'macOS') && steps.cache-icons.outputs.cache-hit != 'true'
if: runner.os == 'Linux' && steps.cache-icons.outputs.cache-hit != 'true'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: bash ./scripts/generate-icons.sh
shell: bash
# Package as .deb for Ubuntu
- name: Package as .deb for Ubuntu
if: runner.os == 'Linux'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: bash ./scripts/release/package-deb.sh
# Package as .zip for macOS
- name: Package as .zip for macOS
if: runner.os == 'macOS'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: bash ./scripts/release/package-macos-zip.sh
# Package as .rpm for RPM based distros
- name: Package as .rpm for RPM based distros
if: runner.os == 'Linux'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: bash ./scripts/release/package-rpm.sh
# Upload build assets
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build.name }} (${{ runner.os }})
path: |
*/bin/*.exe
*\bin\*.exe
*/spinup-*.deb
spinup-*.rpm
spinup-*.zip
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
*/bin/*.exe
*/spinup-*.deb
spinup-*.rpm
spinup-*.zip