-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (71 loc) · 2.19 KB
/
build_executable.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
66
67
68
69
70
71
72
73
name: Compile Binaries
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 1
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
env:
bin: ${{ matrix.os == 'macos-latest' && './temp/darwin/catw' || matrix.os == 'windows-latest' && './temp/windows/catw.exe' || './temp/linux/catw' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
ref: 'dev'
- name: Install Python 3.10
id: python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Update PIP
run: |
python -m pip install --upgrade pip
- name: Setup Compile Dependencies
run: |
python -m pip install --upgrade pyinstaller
- name: Setup Code Dependencies
run: |
python -m pip install --upgrade -r ./workflowHelper/requirements.txt
- name: Setup Version File
run: |
python -m workflowHelper.exeversion
- name: Compile Package
run: |
python -m workflowHelper.build
- name: Test Executable ${{ matrix.os }}
run: |
${{ env.bin }} -h
${{ env.bin }} -v
${{ env.bin }} -p ${{ env.bin }} -R --debug
- name: Show Changes
run: |
git status
- name: Stash Changes
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git add ./temp/*
git stash -- temp
git clean -df
git restore .
- name: Fetch Binaries Branch
run: |
git fetch origin binaries
git checkout binaries
git stash pop
- name: Copy To Bin
run: |
python -c "import sys; import shutil; shutil.copytree('./temp', './bin', dirs_exist_ok=True)"
- name: Commit & Push
run: |
git add ./bin/*
git reset ./temp/*
git status
git commit -m "🤖Compiled Binary for ${{ matrix.os }}."
git push origin HEAD:binaries
continue-on-error: true