Skip to content

release: v2.5.0 - performance optimization + loading animations #15

release: v2.5.0 - performance optimization + loading animations

release: v2.5.0 - performance optimization + loading animations #15

Workflow file for this run

name: Build SurfManager
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
platform:
description: 'Target Platform'
required: true
default: 'all'
type: choice
options:
- all
- windows-amd64
- linux-amd64
- macos-amd64
- macos-arm64
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
platform: windows/amd64
output: SurfManager-windows-amd64.exe
name: windows-amd64
- os: ubuntu-latest
platform: linux/amd64
output: SurfManager-linux-amd64
name: linux-amd64
- os: macos-latest
platform: darwin/amd64
output: SurfManager-darwin-amd64
name: macos-amd64
- os: macos-latest
platform: darwin/arm64
output: SurfManager-darwin-arm64
name: macos-arm64
runs-on: ${{ matrix.os }}
steps:
- name: Check platform filter
id: filter
shell: bash
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
elif [[ "${{ github.event.inputs.platform }}" == "all" ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
elif [[ "${{ github.event.inputs.platform }}" == "${{ matrix.name }}" ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
else
echo "skip=true" >> $GITHUB_OUTPUT
fi
echo "Platform filter: input=${{ github.event.inputs.platform }}, matrix=${{ matrix.name }}, skip=$(cat $GITHUB_OUTPUT | grep skip | cut -d= -f2)"
- name: Checkout
if: steps.filter.outputs.skip == 'false'
uses: actions/checkout@v4
- name: Setup Go
if: steps.filter.outputs.skip == 'false'
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Setup Node.js
if: steps.filter.outputs.skip == 'false'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Wails CLI
if: steps.filter.outputs.skip == 'false'
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Install Linux Dependencies
if: steps.filter.outputs.skip == 'false' && startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
- name: Build
if: steps.filter.outputs.skip == 'false'
shell: bash
run: |
if [[ "${{ matrix.os }}" == ubuntu-* ]]; then
wails build -platform ${{ matrix.platform }} -o ${{ matrix.output }} -tags webkit2_41
else
wails build -platform ${{ matrix.platform }} -o ${{ matrix.output }}
fi
- name: Package macOS App
if: steps.filter.outputs.skip == 'false' && startsWith(matrix.os, 'macos')
run: |
cd build/bin
if [ -d "SurfManager.app" ]; then
mv SurfManager.app ${{ matrix.output }}.app
zip -r ${{ matrix.output }}.zip ${{ matrix.output }}.app
fi
- name: Upload Artifact (Windows/Linux)
if: steps.filter.outputs.skip == 'false' && !startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.output }}
path: build/bin/${{ matrix.output }}*
- name: Upload Artifact (macOS)
if: steps.filter.outputs.skip == 'false' && startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.output }}
path: build/bin/${{ matrix.output }}.zip
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Display structure
run: ls -R artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}