-
Notifications
You must be signed in to change notification settings - Fork 1
135 lines (117 loc) · 3.61 KB
/
Copy pathrelease.yml
File metadata and controls
135 lines (117 loc) · 3.61 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
NODE_OPTIONS: "--max-old-space-size=4096"
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-24.04
goos: linux
goarch: amd64
artifact: fapesnap-linux-amd64.tar.gz
- os: macos-latest
goos: darwin
goarch: arm64
artifact: fapesnap-macos-arm64.app.zip
- os: windows-latest
goos: windows
goarch: amd64
artifact: fapesnap-windows-amd64.exe
- os: windows-latest
goos: windows
goarch: arm64
artifact: fapesnap-windows-arm64.exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "frontend/package-lock.json"
- name: Install Wails CLI
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Install linux dependencies
if: matrix.goos == 'linux'
run: sudo apt-get update -qq && sudo apt-get install -qy libwebkit2gtk-4.1-dev
- name: Build
shell: bash
run: |
TAGS=""
if [ "${{ matrix.goos }}" = "linux" ]; then
TAGS="-tags webkit2_41"
fi
wails build -platform ${{ matrix.goos }}/${{ matrix.goarch }} $TAGS
- name: Package Asset
shell: bash
run: |
if [ "${{ matrix.goos }}" == "linux" ]; then
tar -czf ${{ matrix.artifact }} -C build/bin fapesnap
elif [ "${{ matrix.goos }}" == "darwin" ]; then
(cd build/bin && zip -ry ../../${{ matrix.artifact }} fapesnap.app)
else
cp build/bin/*.exe ${{ matrix.artifact }}
fi
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
path: artifacts
- name: Generate Changelog
id: github_release
uses: mikepenz/release-changelog-builder@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: HYBRID
configurationJson: |
{
"commit_template": "- #{{MERGE_SHA}} #{{TITLE}}",
"categories": [
{
"title": "## ✨ Features",
"labels": ["feat", "feature"]
},
{
"title": "## 🔧 Fixes",
"labels": ["fix", "bug"]
},
{
"title": "## 📦 Other",
"labels": []
}
],
"label_extractor": [
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)",
"on_property": "title",
"target": "$1"
}
]
}
- name: Update release (Update the release created by wails-build-action)
uses: softprops/action-gh-release@v3
with:
body: ${{ steps.github_release.outputs.changelog }}
files: artifacts/**/*