v2.7.3 build #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |