修复 GitHub Actions 语法错误
- 合并重复的 push 触发器 - 修复 YAML 语法问题 - 确保标签推送时自动创建 Release
This commit is contained in:
parent
b8a4b73bb0
commit
adc4a4ff2c
5
.github/workflows/deploy-linux.yml
vendored
5
.github/workflows/deploy-linux.yml
vendored
@ -3,7 +3,6 @@ name: Build Linux Binary
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
@ -49,6 +48,8 @@ jobs:
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "release" ]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref_type }}" = "tag" ]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
elif [ -n "${{ github.event.inputs.version }}" ]; then
|
||||
VERSION="${{ github.event.inputs.version }}"
|
||||
else
|
||||
@ -103,7 +104,7 @@ jobs:
|
||||
--title "PPanel Server ${{ env.VERSION }}" \
|
||||
--notes "Release ${{ env.VERSION }}" \
|
||||
--latest
|
||||
elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref_type }}" = "tag" ]; then
|
||||
elif [ "${{ github.event_name }}" = "push" ] && startsWith(github.ref, 'refs/tags/'); then
|
||||
echo "Creating release for tag ${{ env.VERSION }}"
|
||||
gh release create ${{ env.VERSION }} \
|
||||
--title "PPanel Server ${{ env.VERSION }}" \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user