-
Notifications
You must be signed in to change notification settings - Fork 1
139 lines (116 loc) · 3.57 KB
/
Copy pathrelease.yml
File metadata and controls
139 lines (116 loc) · 3.57 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
136
137
138
139
name: Build and Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libboost-all-dev libssl-dev zlib1g-dev cmake build-essential
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build i2pd libraries
run: |
chmod +x internal/network/i2pd/build_linux.sh
./internal/network/i2pd/build_linux.sh
- name: Build Wails App
run: |
export CGO_LDFLAGS_ALLOW=".*"
wails build -tags cgo_i2pd -platform linux/amd64
- name: Rename and Prepare Binary
run: |
mv build/bin/TeleGhost TeleGhost-linux-amd64
chmod +x TeleGhost-linux-amd64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: teleghost-linux
path: TeleGhost-linux-amd64
# Note: Windows build is complex due to C++ dependencies (Boost/OpenSSL)
# This is a best-effort configuration.
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-boost
mingw-w64-x86_64-openssl
mingw-w64-x86_64-zlib
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build i2pd libraries (Windows)
shell: msys2 {0}
run: |
chmod +x internal/network/i2pd/build_windows.sh
./internal/network/i2pd/build_windows.sh
- name: Build Wails App
shell: msys2 {0}
run: |
# Add Go and Node to MSYS2 path
export PATH=$PATH:/c/hostedtoolcache/go/1.21.13/x64/bin
export PATH=$PATH:/c/npm/prefix
export PATH=$PATH:$(go env GOPATH)/bin
# Build with cgo_i2pd
wails build -tags cgo_i2pd -platform windows/amd64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: teleghost-windows
path: build/bin/TeleGhost.exe
release:
name: Create Release
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: teleghost-linux
- name: Download Windows Artifact
uses: actions/download-artifact@v4
with:
name: teleghost-windows
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
TeleGhost-linux-amd64
TeleGhost.exe
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}