Skip to content

Commit c6cfbd1

Browse files
committed
last workflow attempt today
1 parent 5a1cfa9 commit c6cfbd1

File tree

1 file changed

+98
-16
lines changed

1 file changed

+98
-16
lines changed

.github/workflows/release.yml

Lines changed: 98 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,119 @@ name: Wails build
33
on:
44
push:
55
tags:
6-
# Match any new tag
7-
- '*'
8-
9-
env:
10-
# Necessary for most environments as build failure can occur due to OOM issues
11-
NODE_OPTIONS: "--max-old-space-size=4096"
6+
- '*' # Run on any tag for releases
127

138
jobs:
14-
build:
9+
build-linux-windows:
1510
strategy:
1611
fail-fast: false
1712
matrix:
1813
build: [
1914
{name: ArchivePlayer, platform: linux/amd64, os: ubuntu-latest},
2015
{name: ArchivePlayer, platform: windows/amd64, os: windows-latest},
21-
{name: ArchivePlayer, platform: darwin/universal, os: macos-latest}
2216
]
2317
runs-on: ${{ matrix.build.os }}
2418
steps:
2519
- uses: actions/checkout@v4
2620
with:
2721
submodules: recursive
2822

23+
- name: Install Linux dependencies
24+
if: matrix.build.os == 'ubuntu-latest'
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y \
28+
libgtk-3-dev \
29+
libwebkit2gtk-4.0-dev \
30+
pkg-config \
31+
build-essential \
32+
ffmpeg # Required for clip creation feature
33+
34+
- name: Set up Go
35+
uses: actions/setup-go@v4
36+
with:
37+
go-version: '1.24.2' # Match your local Go version
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: '20'
43+
44+
# Install Wails
45+
- name: Install Wails
46+
run: |
47+
go install github.com/wailsapp/wails/v2/cmd/wails@latest
48+
wails doctor
49+
50+
# Build the application
51+
- name: Build Wails app
52+
run: |
53+
wails build -platform ${{ matrix.build.platform }} -webview2 download
54+
55+
# Upload artifacts
56+
- uses: actions/upload-artifact@v4
57+
with:
58+
name: ArchivePlayer-${{ matrix.build.os }}
59+
path: ./build/bin/
2960

30-
# Install the correct version of garble
31-
- name: Install garble
32-
run: go install mvdan.cc/garble@latest
61+
build-macos:
62+
runs-on: macos-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
with:
66+
submodules: recursive
67+
68+
- name: Setup Go
69+
uses: actions/setup-go@v4
70+
with:
71+
go-version: '1.24.2' # Match your local Go version
72+
73+
- name: Setup Node.js
74+
uses: actions/setup-node@v3
75+
with:
76+
node-version: '20'
77+
78+
# Install FFmpeg for clip creation feature
79+
- name: Install FFmpeg
80+
run: brew install ffmpeg
81+
82+
- name: Install Wails
83+
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
3384

34-
# Use the wails-build-action with specified version
35-
- uses: dAppServer/wails-build-action@main
85+
- name: Install macOS build dependencies
86+
run: brew install nsis
87+
88+
- name: Build app
89+
run: |
90+
wails build --platform darwin/universal -webview2 download
91+
ditto -c -k ./build/bin/ArchivePlayer.app ./build/bin/ArchivePlayer.app.zip
92+
93+
- name: Building Installer
94+
run: |
95+
productbuild --component ./build/bin/ArchivePlayer.app ./build/bin/ArchivePlayer.pkg
96+
97+
- uses: actions/upload-artifact@v4
3698
with:
37-
build-name: ${{ matrix.build.name }}
38-
build-platform: ${{ matrix.build.platform }}
39-
build-obfuscate: true
99+
name: ArchivePlayer-macos
100+
path: ./build/bin/
101+
102+
create-release:
103+
needs: [build-linux-windows, build-macos]
104+
runs-on: ubuntu-latest
105+
if: startsWith(github.ref, 'refs/tags/')
106+
steps:
107+
- name: Download all artifacts
108+
uses: actions/download-artifact@v4
109+
with:
110+
path: artifacts
111+
112+
- name: Create Release
113+
uses: softprops/action-gh-release@v1
114+
with:
115+
files: |
116+
artifacts/ArchivePlayer-ubuntu-latest/*
117+
artifacts/ArchivePlayer-windows-latest/*
118+
artifacts/ArchivePlayer-macos/*
119+
draft: false
120+
prerelease: false
121+

0 commit comments

Comments
 (0)