init
This commit is contained in:
17
.github/workflows/release.yaml
vendored
17
.github/workflows/release.yaml
vendored
@@ -6,7 +6,7 @@ permissions:
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*' # 打 tag 触发,例如 v1.0.0
|
- 'v*' # 例如 v1.0.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -33,7 +33,9 @@ jobs:
|
|||||||
- name: Build executable
|
- name: Build executable
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# 设置系统名
|
echo "Runner OS: ${{ runner.os }}"
|
||||||
|
|
||||||
|
# 根据平台设置系统名和扩展名
|
||||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||||
SYSNAME=windows
|
SYSNAME=windows
|
||||||
EXT=.exe
|
EXT=.exe
|
||||||
@@ -48,13 +50,12 @@ jobs:
|
|||||||
# 用 PyInstaller 打包
|
# 用 PyInstaller 打包
|
||||||
pyinstaller --onefile rsync-tui.py
|
pyinstaller --onefile rsync-tui.py
|
||||||
|
|
||||||
# 重命名生成的可执行文件
|
# 带系统名和 tag 重命名
|
||||||
mv dist/rsync-tui${EXT} dist/rsync-tui-${SYSNAME}${EXT}
|
TAG_NAME=${GITHUB_REF##*/}
|
||||||
|
mv dist/rsync-tui${EXT} dist/rsync-tui-${SYSNAME}-${TAG_NAME}${EXT}
|
||||||
|
|
||||||
# 删除原始文件(如果有)
|
# 显示结果
|
||||||
[ -f dist/rsync-tui${EXT} ] && rm dist/rsync-tui${EXT}
|
ls -l dist
|
||||||
|
|
||||||
ls dist
|
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user