update github actions
This commit is contained in:
14
.github/workflows/release.yaml
vendored
14
.github/workflows/release.yaml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user