refactor: 更新构建配置,添加对发布事件的支持;更新依赖项以确保兼容性

This commit is contained in:
Elysia
2026-01-30 22:27:48 +08:00
parent a517d03da8
commit 150c57038d
3 changed files with 25 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ name: Build
on:
push:
branches: [main]
tags:
- "*"
paths-ignore:
- "**.md"
- "**.spec.js"
@@ -25,6 +27,11 @@ on:
- ".gitignore"
- ".github/**"
- "!.github/workflows/build.yml"
release:
types: [published, created]
permissions:
contents: write
jobs:
build:
@@ -78,4 +85,14 @@ jobs:
with:
name: release_for_${{ matrix.package }}
path: release/**/*.${{ matrix.package }}
retention-days: 5
retention-days: 5
- name: Upload to GitHub Release
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: |
release/**/*.deb
release/**/*.rpm
generate_release_notes: true