-
Notifications
You must be signed in to change notification settings - Fork 65
68 lines (55 loc) · 1.78 KB
/
linux-release.yml
File metadata and controls
68 lines (55 loc) · 1.78 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
name: Build linux release
on:
push:
tags:
- 'v*'
release:
types: [ published ]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
fetch-depth: 0
- name: Install dependencies
# install libxcb-xinerama0 to fix "Could not load the Qt platform plugin 'xcb'"
# https://forum.qt.io/post/610967
run: |
sudo apt-get install libxcb-xinerama0
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_build_addon.txt
- name: Determine Version
id: get_version
shell: bash
run: |
VERSION=$(git describe --tags --always --dirty)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "Version determined: $VERSION"
echo "__version__ = '${{ env.VERSION }}'" > src/version.py
cat src/version.py
- name: Build package
run: pyinstaller -F run_gui.py -i "pdf.ico" --exclude config.ini --distpath . -n "pdfdir" --noconsole
- name: Build debug package
run: pyinstaller -F run_gui.py -i "pdf.ico" --exclude config.ini --distpath . -n "pdfdir_debug"
- name: Prepare file
run: |
chmod +x pdfdir
zip -r pdfdir_ubuntu.zip pdfdir
- name: Prepare debug file
run: |
chmod +x pdfdir_debug
zip -r pdfdir_debug_ubuntu.zip pdfdir_debug
- name: Upload package
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
pdfdir_ubuntu.zip
pdfdir_debug_ubuntu.zip