From cdb593bca9fab409f0e7213f6f9562271bc4c98b Mon Sep 17 00:00:00 2001 From: siujamo Date: Mon, 22 Jun 2026 11:13:54 +0800 Subject: [PATCH] ci: upload build artifacts directly to release - Replace upload-artifact with direct release upload via Gitea API --- .gitea/workflows/build.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index fe59b53..0a3cf10 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -61,8 +61,10 @@ jobs: tar czf "${{ matrix.archive }}" "${{ matrix.binary }}" fi - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.archive }} - path: target/${{ matrix.target }}/release/${{ matrix.archive }} + - name: Upload to release + run: | + curl --fail -X POST \ + -H "Authorization: Bearer ${{ secrets.GITEA_TOKEN }}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"target/${{ matrix.target }}/release/${{ matrix.archive }}" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=${{ matrix.archive }}"