forked from FaithLife-Community/LogosLinuxInstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (59 loc) · 1.59 KB
/
build-branch.yml
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
name: Build branch with PyInstaller
on:
workflow_call:
inputs:
branch:
required: true
type: string
outputs:
bin_name:
description: "name of built binary"
value: ${{ jobs.build.outputs.bin_name }}
sha:
value: ${{ github.sha }}
sha_short:
description: "1st few chars of commit SHA"
value: ${{ jobs.build.outputs.sha_short }}
workflow_dispatch:
inputs:
branch:
description: "branch to build from:"
required: true
type: string
jobs:
build:
runs-on: ubuntu-20.04
outputs:
bin_name: ${{ steps.pyinstaller.outputs.bin_name }}
sha_short: ${{ steps.sha.outputs.sha_short }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Get 1st 7 chars of commit SHA
id: sha
run: |
sha="$(git log -n 1 ${{ inputs.branch }} | grep commit | awk '{print $2}')"
echo $sha
echo "sha_short=${sha:0:7}" >> $GITHUB_OUTPUT
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: pip
- name: Install dependencies
run: |
# apt-get install python3-tk
pip install --upgrade pip
pip install .[build]
- name: Build with pyinstaller
id: pyinstaller
run: |
./scripts/build-binary.sh
echo "bin_name=oudedetai" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: oudedetai
path: dist/oudedetai
compression-level: 0