From fbf87fa810f5af0b33896842a3bd9659a602ca79 Mon Sep 17 00:00:00 2001 From: zihluwang Date: Wed, 17 Jun 2026 00:32:55 +0800 Subject: [PATCH] ci: use Gitea-compatible artifact actions for multi-job workflow --- .gitea/workflows/build.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 29d6d57..62c96e9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -5,8 +5,8 @@ on: types: [published] jobs: - build-deploy: - name: Build, Release and Deploy + build: + name: Build release archive runs-on: ubuntu-latest steps: @@ -30,6 +30,24 @@ jobs: - name: Build release archive run: pnpm build:tar + - name: Upload build artifact + uses: maxsargentdev/gitea-upload-artifact@v4 + with: + name: dist-archive + path: dist.tar.gz + retention-days: 1 + + upload-release-asset: + name: Upload to Gitea Release + needs: build + runs-on: ubuntu-latest + + steps: + - name: Download build artifact + uses: christopherHX/gitea-download-artifact@v4 + with: + name: dist-archive + - name: Upload to Gitea Release run: | set -e @@ -42,6 +60,17 @@ jobs: --data-binary "@dist.tar.gz" \ "${URL}" + deploy-to-server: + name: Deploy to onixbyte.cn + needs: build + runs-on: ubuntu-latest + + steps: + - name: Download build artifact + uses: christopherHX/gitea-download-artifact@v4 + with: + name: dist-archive + - name: Upload archive to server env: DEPLOY_HOST: ${{ vars.DEPLOY_HOST }}