-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.8 KB
/
build.yml
File metadata and controls
66 lines (56 loc) · 1.8 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
name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
# JOB 1: Build for AMD64 (Standard PC) - Runs natively
build-amd64:
name: Build amd64
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
# Install system dependencies required for PyInstaller and Qt
sudo apt-get install -y python3 python3-pip python3-venv build-essential libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 wireguard-tools
# Install Python libraries (AMD64 has good wheels, so pip is fine here)
pip3 install PyQt6 pyinstaller
- name: Build Package
run: |
# Extract version
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
else
VERSION="0.0.1-dev"
fi
echo "Building version $VERSION for amd64..."
chmod +x package_app.sh
./package_app.sh $VERSION
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: wiretray-amd64
path: "*.deb"
# JOB 2: Release
release:
name: Create Release
needs: [build-amd64]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
wiretray-amd64/*.deb
draft: false
prerelease: false
generate_release_notes: true