Skip to content

Commit

Permalink
新增Actions构建
Browse files Browse the repository at this point in the history
  • Loading branch information
auqhjjqdo committed Mar 10, 2023
1 parent 26840c7 commit abcdb56
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build

on:
workflow_dispatch:
push:
paths-ignore:
- "README.md"
tags:
- "v*"

jobs:
build:
strategy:
matrix:
os: [ macos-latest, ubuntu-20.04, windows-latest ]
permissions:
contents: write
runs-on: ${{ matrix.os }}

steps:
- name: Check-out repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build Executable
run: |
pyinstaller main.spec --distpath .
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: LiveRecorder_${{ runner.os }}_${{ github.ref_name }}
path: |
config.json
LiveRecorder*
- name: Create Archive
uses: thedoctor0/zip-release@main
with:
filename: LiveRecorder_${{ runner.os }}_${{ github.ref_name }}.zip
path: |
config.json
LiveRecorder*
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./*.zip
Binary file added bambino.ico
Binary file not shown.
46 changes: 46 additions & 0 deletions main.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_data_files, collect_submodules # append


block_cipher = None


a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=collect_data_files('streamlink.plugins', include_py_files=True),
hiddenimports=collect_submodules('streamlink.plugins'),
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='LiveRecorder',
icon='bambino.ico',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

0 comments on commit abcdb56

Please sign in to comment.