-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (78 loc) · 2.25 KB
/
Copy pathtag-release.yml
File metadata and controls
90 lines (78 loc) · 2.25 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
# .github/workflows/tag-release.yml
name: Tag Release Build
on:
push:
tags:
- 'v*' # tags like v1.0.0
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
pip install pyinstaller
# Install GUI-specific dependencies
pip install pyqt6 httpx
- name: Build wheel (Linux) or exe (Windows)
if: matrix.os == 'ubuntu-latest'
run: |
python -m build
- name: Build Windows executable
if: matrix.os == 'windows-latest'
run: |
pyinstaller --onefile owlbearag/cli.py --name owlbearag.exe
- name: Build Linux GUI executable
if: matrix.os == 'ubuntu-latest'
run: |
pyinstaller --onefile llama_node/gui_client.py --name owlbearag_gui
- name: Build Windows GUI executable
if: matrix.os == 'windows-latest'
run: |
pyinstaller --onefile llama_node/gui_client.py --name owlbearag_gui.exe
- name: Upload artifacts for release
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-artifacts
path: |
dist/*.whl
dist/*.tar.gz
dist/owlbearag.exe
dist/owlbearag_gui
dist/owlbearag_gui.exe
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-artifacts
path: |
dist/*.whl
dist/*.tar.gz
dist/owlbearag.exe
publish-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: ./artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: ./artifacts/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}