-
Notifications
You must be signed in to change notification settings - Fork 3
163 lines (160 loc) · 5.59 KB
/
release.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Package Application with cx_Freeze
on:
workflow_dispatch:
inputs:
version:
description: "Version (semantic)"
required: true
default: "X.X"
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
architecture: [ 'x64', 'x86' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: ${{ matrix.architecture }}
cache: 'pip'
cache-dependency-path: 'poetry.lock'
- name: Install requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .
pip install cx-Freeze
- name: Download ffmpeg
run: |
Invoke-WebRequest https://github.com/GyanD/codexffmpeg/releases/download/5.1/ffmpeg-5.1-essentials_build.zip -O ffmpeg.zip
tar.exe -xf ffmpeg.zip
move ffmpeg-5.1-essentials_build/bin/ffmpeg.exe ffmpeg.exe
move ffmpeg-5.1-essentials_build/bin/ffprobe.exe ffprobe.exe
- run: python setup.py build -b dist
- run: tar.exe -acf TranscribeArabic-${{ runner.os }}-${{ matrix.architecture }}-portable.zip dist
- uses: actions/upload-artifact@v3
with:
name: TranscribeArabic-${{ runner.os }}-${{ matrix.architecture }}-portable
path: TranscribeArabic-${{ runner.os }}-${{ matrix.architecture }}-portable.zip
build-windows-msi:
runs-on: windows-latest
strategy:
matrix:
architecture: [ 'x64', 'x86' ]
env:
LANG: C.UTF-8
LC_ALL: C.UTF-8
LC_CTYPE: C.UTF-8
PYTHONIOENCODING: UTF-8
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: ${{ matrix.architecture }}
cache: 'pip'
cache-dependency-path: 'poetry.lock'
- name: Install requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .
pip install cx-Freeze
- name: Download ffmpeg
run: |
Invoke-WebRequest https://github.com/GyanD/codexffmpeg/releases/download/5.1/ffmpeg-5.1-essentials_build.zip -O ffmpeg.zip
tar.exe -xf ffmpeg.zip
move ffmpeg-5.1-essentials_build/bin/ffmpeg.exe ffmpeg.exe
move ffmpeg-5.1-essentials_build/bin/ffprobe.exe ffprobe.exe
- run: python setup.py build bdist_msi
# - run: mv 'dist/*.msi' TranscribeArabic-${{ runner.os }}-${{ matrix.architecture }}.msi
- uses: actions/upload-artifact@v3
with:
name: TranscribeArabic-${{ runner.os }}-${{ matrix.architecture }}.msi
path: 'dist/*.msi'
build-macos-dmg:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: 'poetry.lock'
- name: Install requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .
pip install cx-Freeze
- name: Run cx_Freeze
run: python setup.py bdist_dmg
- run: mv 'build/Install Transcribe Arabic.dmg' TranscribeArabic-macOS.dmg
- uses: actions/upload-artifact@v3
with:
name: TranscribeArabic-macOS.dmg
path: TranscribeArabic-macOS.dmg
build-macos-app:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: 'poetry.lock'
- name: Install requirements
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .
pip install cx-Freeze
- name: Run cx_Freeze
run: python setup.py bdist_mac
- run: mv build/TranscribeArabic.app TranscribeArabic-macOS.app
- run: zip -r9 TranscribeArabic-macOS-app.zip TranscribeArabic-macOS.app/*
- uses: actions/upload-artifact@v3
with:
name: TranscribeArabic-macOS-app.zip
path: TranscribeArabic-macOS-app.zip
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Package CLI Application for Linux
uses: yshalsager/pyinstaller-action-linux@main
with:
path: .
spec: wit_transcriber.spec
requirements: requirements.txt
- uses: actions/upload-artifact@v3
with:
name: TranscribeArabic-Linux-CLI
path: dist/linux/wit_transcriber
- name: Package GUI Application for Linux
uses: yshalsager/pyinstaller-action-linux@tkinter
with:
path: .
spec: wit_transcriber_gui.spec
requirements: requirements.txt
tkinter: true
- uses: actions/upload-artifact@v3
with:
name: TranscribeArabic-Linux-GUI
path: dist/linux/wit_transcriber_gui
release:
runs-on: ubuntu-latest
needs: [build-windows, build-windows-msi, build-macos-dmg, build-macos-app, build-linux]
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
commit: 'master'
tag: ${{ github.event.inputs.version }}
name: ${{ github.event.inputs.version }}
artifacts: '*/*.msi, */*.zip, */wit_transcriber, */wit_transcriber_gui, */*.dmg'