-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (86 loc) · 2.72 KB
/
Copy pathrelease.yml
File metadata and controls
102 lines (86 loc) · 2.72 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
name: Release
permissions:
contents: read
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
platform: windows/amd64
name: catnet-windows.exe
- os: ubuntu-22.04
platform: linux/amd64
name: catnet-linux
- os: macos-latest
platform: darwin/universal
name: catnet-macos
runs-on: ${{ matrix.os }}
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
path: app
- name: Checkout engine
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: catnet-io/engine
path: engine
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.26.x'
- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
- name: Build Wails App
working-directory: app
run: wails build -platform ${{ matrix.platform }} -tags webkit2_41
- name: Rename build
working-directory: app
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
mv build/bin/*.exe build/bin/${{ matrix.name }}
else
mv build/bin/* build/bin/${{ matrix.name }}
fi
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ${{ matrix.name }}
path: app/build/bin/${{ matrix.name }}
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
path: app
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
path: artifacts
- name: Extract Release Notes
id: extract-notes
working-directory: app
run: |
VERSION=${GITHUB_REF#refs/tags/}
VERSION_NO_V=${VERSION#v}
awk "/## \[$VERSION_NO_V\]/{flag=1; print; next} /## \[/{if(flag) exit} flag" CHANGELOG.md > RELEASE_NOTES.md
- name: Create Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
files: artifacts/**/*
body_path: app/RELEASE_NOTES.md