-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (75 loc) · 2.37 KB
/
release.yml
File metadata and controls
89 lines (75 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
build-desktop:
name: Build Desktop App
# Run independently - don't wait for goreleaser
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Install Linux Dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
- name: Build Desktop App
if: matrix.os == 'macos-latest'
run: wails build -platform darwin/universal
- name: Build Desktop App
if: matrix.os != 'macos-latest'
run: wails build -tags webkit2_41
- name: Rename Artifacts (Unix)
if: matrix.os != 'windows-latest'
run: |
mkdir release-artifacts
if [ "${{ matrix.os }}" = "macos-latest" ]; then
# Wails builds ask-desktop.app on macOS
cd build/bin
zip -r ../../release-artifacts/ask-desktop-macos-universal.zip ask-desktop.app
else
cp build/bin/ask-desktop release-artifacts/ask-desktop-linux-amd64
fi
- name: Rename Artifacts (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
mkdir release-artifacts
Copy-Item build/bin/ask-desktop.exe release-artifacts/ask-desktop-windows-amd64.exe
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: release-artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}