-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.41 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (42 loc) · 1.41 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
# 推送 v* / V* tag(或手动触发)时,在 ubuntu-24.04 (amd64) 上构建
# .deb 与 .AppImage,并自动附加到对应 GitHub Release。
name: Build Linux packages
on:
push:
tags: ["v*", "V*"]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgl1 libegl1 libxkbcommon0 libxcb-cursor0 libdbus-1-3 libasound2t64
- name: Prepare build venv
run: |
python3 -m venv .venv
.venv/bin/pip install -U pip wheel
.venv/bin/pip install -r requirements.txt pyinstaller pillow
- name: Build .deb and AppImage (amd64)
env:
PYINSTALLER_BIN: ${{ github.workspace }}/.venv/bin/pyinstaller
run: |
VERSION="${GITHUB_REF_NAME##*[vV]}"
[ -n "$VERSION" ] || VERSION="dev"
PATH="${{ github.workspace }}/.venv/bin:$PATH" bash packaging/build.sh "$VERSION"
- name: Attach artifacts to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.deb
dist/*.AppImage
generate_release_notes: true