Skip to content

Update main.go

Update main.go #32

Workflow file for this run

name: Desktop Build
on:
push:
branches:
- master
tags:
- '*'
jobs:
build:
strategy:
# Failure in one platform build won't impact the others
fail-fast: false
matrix:
build:
# - name: 'App'
# platform: 'linux/amd64'
# os: 'ubuntu-latest'
- name: 'App'
platform: 'windows/amd64'
os: 'windows-latest'
# - name: 'App'
# platform: 'darwin/universal'
# os: 'macos-latest'
runs-on: ${{ matrix.build.os }}
permissions:
contents: write
packages: write
id-token: write
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
submodules: recursive
- name: cd to shadfin_app
run: cd ./shadfin_app
shell: bash
- name: Setup GoLang
# Setup and configure GoLang
uses: actions/setup-go@v5
with:
check-latest: true
go-version: 1.23.3
- run: go version
shell: bash
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Extract libmpv
shell: bash
run: |
cd ./shadfin_app
7z x libmpv.7z
- name: Build Release (Tag)
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ./shadfin_app
wails build -tags "pkgconfig,production,desktop,nocgo" -devtools -skipbindings -nsis
shell: bash
- name: Build Artifact
if: ${{ !(startsWith(github.ref, 'refs/tags/')) }}
run: |
cd ./shadfin_app
wails build -tags "pkgconfig,production,desktop,nocgo" -windowsconsole -devtools -skipbindings -nsis
shell: bash
- uses: actions/upload-artifact@v3
with:
name: Automated Build
path: |
shadfin_app/.build/bin/
shadfin_app\.build\bin\*
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
shadfin_app/.build/bin/*