update github actions

This commit is contained in:
Matt.Ma
2025-09-09 15:59:06 +08:00
parent cf63663781
commit 83cd6da29c

View File

@@ -6,7 +6,7 @@ permissions:
on: on:
push: push:
tags: tags:
- 'v*' # 例如 v1.0.0 - 'v*'
jobs: jobs:
build: build:
@@ -47,7 +47,7 @@ jobs:
EXT= EXT=
fi fi
# 打包 # 用 PyInstaller 打包
pyinstaller --onefile rsync-tui.py pyinstaller --onefile rsync-tui.py
# 获取 tag 名 # 获取 tag 名
@@ -56,30 +56,30 @@ jobs:
# 重命名可执行文件 # 重命名可执行文件
mv dist/rsync-tui${EXT} dist/rsync-tui-${SYSNAME}-${TAG_NAME}${EXT} mv dist/rsync-tui${EXT} dist/rsync-tui-${SYSNAME}-${TAG_NAME}${EXT}
# 显示 dist 内容
ls -l dist ls -l dist
- name: Upload build artifact - name: Upload build artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: rsync-tui name: rsync-tui-${{ runner.os }}
path: dist/rsync-tui-* path: dist/rsync-tui-*
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
- name: Download artifacts - name: Download all artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: rsync-tui
path: dist path: dist
- name: Prepare files for release - name: Prepare files for release
shell: bash shell: bash
run: | run: |
mkdir -p dist-root mkdir -p dist-root
cp dist/* dist-root/ for d in dist/*; do
cp "$d"/* dist-root/
done
ls -l dist-root ls -l dist-root
- name: Create Release - name: Create Release