-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 2.19 KB
/
release.yml
File metadata and controls
79 lines (66 loc) · 2.19 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
name: Wails Release
on:
push:
tags:
- 'v*' # Triggers on any tag starting with 'v', e.g., v1.0.1
jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: windows/amd64
- os: windows-latest
platform: windows/arm64
- os: macos-latest
platform: darwin/universal
- os: ubuntu-22.04
platform: linux/amd64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
# Linux requires specific GTK and WebKit libraries to build Wails
- name: Install Linux Dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: Install Wails CLI
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build Wails App
run: wails build -platform ${{ matrix.platform }} -clean -ldflags "-X main.Version=${{ github.ref_name }}"
# Compression/Artifact handling
- name: Package (Windows)
if: matrix.os == 'windows-latest'
run: |
$arch = "${{ matrix.platform }}".Split("/")[-1]
Compress-Archive -Path build/bin/* -DestinationPath "celerix-git-windows-$arch.zip"
- name: Package (macOS)
if: matrix.os == 'macos-latest'
run: tar -czvf celerix-git-macos-universal.tar.gz -C build/bin .
- name: Package (Linux)
if: matrix.os == 'ubuntu-22.04'
run: tar -czvf celerix-git-linux-amd64.tar.gz -C build/bin .
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
*.zip
*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}