From 1427a67964c19de5538c0ead8a13bc387120beba Mon Sep 17 00:00:00 2001 From: root Date: Sun, 28 Jun 2026 18:28:42 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20GitHub=20Actions?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A8=E5=8F=91=E5=B8=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 打 tag 自动触发 - 生成源码 zip 包 - 自动创建 Release 并上传附件 --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..049d0d9 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }}