mirror of
https://github.com/zhang-pu/tpanel.git
synced 2026-10-02 16:29:29 +08:00
chore: 添加 GitHub Actions 自动发布配置
- 打 tag 自动触发 - 生成源码 zip 包 - 自动创建 Release 并上传附件
This commit is contained in:
parent
79981cde4a
commit
1427a67964
1 changed files with 39 additions and 0 deletions
39
.github/workflows/release.yml
vendored
Normal file
39
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create source package
|
||||||
|
run: |
|
||||||
|
zip -r tpanel-${{ github.ref_name }}-source.zip . \
|
||||||
|
-x ".git/*" \
|
||||||
|
-x ".github/*" \
|
||||||
|
-x "venv/*" \
|
||||||
|
-x "sites/*" \
|
||||||
|
-x "logs/*" \
|
||||||
|
-x "backups/*" \
|
||||||
|
-x "data/*" \
|
||||||
|
-x "ssl/*" \
|
||||||
|
-x ".well-known/*" \
|
||||||
|
-x "*.db" \
|
||||||
|
-x "*.sqlite" \
|
||||||
|
-x "*.log" \
|
||||||
|
-x "*.bak"
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: TPanel ${{ github.ref_name }}
|
||||||
|
generate_release_notes: true
|
||||||
|
files: tpanel-${{ github.ref_name }}-source.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
Reference in a new issue