Skip to content

merge: dev 1.8

merge: dev 1.8 #28

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
name: Build App
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-13, macos-14 ]
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build
run: pyinstaller build.spec
- name: Zip (Windows)
if: matrix.os == 'windows-latest'
run: |
cd dist
7z a -r SubtitleRenamer_windows.zip *
- name: Zip (macOS-x64)
if: matrix.os == 'macos-13'
run: |
cd dist
zip -9 -r SubtitleRenamer_macos_x64.zip ./SubtitleRenamer.app
- name: Zip (macOS-arm64)
if: matrix.os == 'macos-14'
run: |
cd dist
zip -9 -r SubtitleRenamer_macos_arm64.zip ./SubtitleRenamer.app
- name: Zip (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
cd dist
zip -9 -r SubtitleRenamer_linux.zip ./*
- name: Upload
uses: actions/upload-artifact@v3
with:
path: dist/*.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v3
with:
path: asset
- name: dist
run: |
mkdir dist
cp -r asset/artifact/* dist
cd dist && ls
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: tag
draft: true
files: dist/*
name: 🎉
body: |
## 新增
- 新增内容
## 优化
- 优化内容