-
Notifications
You must be signed in to change notification settings - Fork 102
81 lines (69 loc) · 2.35 KB
/
build.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
name: build binaries
on:
push:
tags:
- "v*"
jobs:
build_matrix:
strategy:
matrix:
env: [linux, windows, macos]
include:
- env: linux
os: ubuntu-latest
bin: twitchTransFN
archive: tar.gz
- env: windows
os: windows-latest
bin: twitchTransFN.exe
archive: zip
- env: macos
os: macos-latest
bin: twitchTransFN.command
archive: tar.gz
arch: _intel
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: upgrade pip and install dependencies
run: python -m pip install --upgrade pip setuptools wheel
# Windowsの場合のみPyInstallerのブートローダーを再ビルド
- name: Clone PyInstaller and Rebuild Bootloader for Windows
if: matrix.env == 'windows'
run: |
git clone https://github.com/pyinstaller/pyinstaller
cd pyinstaller/bootloader
python ./waf distclean all
cd ..
pip install .
# LinuxとmacOSの場合にPyInstallerをインストール
- name: Install PyInstaller for Linux and MacOS
if: matrix.env != 'windows'
run: python -m pip install pyinstaller
- name: install requirements
run: python -m pip install -r requirements.txt
- name: build
run: python build.py
- name: move config.py
run: mv config.py dist/
- name: archive with zip
if: ${{ matrix.archive == 'zip' }}
run: powershell Compress-Archive -Path dist/* -DestinationPath ${{'twitchTransFN_'}}${{ matrix.env }}.zip
- name: archive with tar.gz
if: ${{ matrix.archive == 'tar.gz' }}
run: |
mv dist ${{'twitchTransFN_'}}${{ matrix.env }}
tar acvf ${{'twitchTransFN_'}}${{ matrix.env }}${{ matrix.arch }}.tar.gz ${{'twitchTransFN_'}}${{ matrix.env }}
- name: update github release
id: create_release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
files: ${{'twitchTransFN_'}}${{ matrix.env }}${{ matrix.arch }}.${{ matrix.archive }}