-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.55 KB
/
publish-app.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
name: Publish App
on:
push:
tags:
- "v*.*.*-app"
defaults:
run:
shell: bash
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup_python
with:
python-version: "3.12"
- name: Restore cached venv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements-ci-app.txt', 'requirements.txt') }}
path: .venv
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate || source .venv/scripts/activate
python -m pip install -r requirements-ci-app.txt
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- name: Saved cached venv
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements-ci-app.txt', 'requirements.txt') }}
path: .venv
- name: Build
run: |
cd src
pyinstaller --noconsole app.py
- name: Archive
run: |
zip -r byzantine-chant-ocr-${{github.ref_name}}-${{ runner.os }}.zip src/dist
- name: Release
uses: softprops/action-gh-release@v2
with:
files: byzantine-chant-ocr-${{github.ref_name}}-${{ runner.os }}.zip