From 39a79f78fcf65de8d32a4731b3f646da31bd6091 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 15 Aug 2026 10:48:51 +0500 Subject: [PATCH] =?UTF-8?q?fix:=20build+package=20=D0=B2=20=D0=BE=D0=B4?= =?UTF-8?q?=D0=BD=D0=BE=D0=B9=20=D0=B4=D0=B6=D0=BE=D0=B1=D0=B5=20(upload-a?= =?UTF-8?q?rtifact=20=D0=BD=D0=B5=D1=81=D0=BE=D0=B2=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D0=BC=20=D1=81=20Gitea)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 3298b3b..26b3b85 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -31,7 +31,8 @@ jobs: - name: Vet run: go vet ./... - build: + build-and-package: + if: always() needs: test runs-on: ubuntu-latest steps: @@ -45,21 +46,8 @@ jobs: - name: Build binary run: go build -ldflags="-s -w" -o ratatoskr ./cmd/ratatoskr/ - - uses: actions/upload-artifact@v4 - with: - name: ratatoskr - path: ratatoskr - - package: - if: gitea.ref == 'refs/heads/main' - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v4 - with: - name: ratatoskr - - name: Upload to Gitea Packages + if: gitea.ref == 'refs/heads/main' run: | VERSION="commit-$(echo '${{ gitea.sha }}' | cut -c1-7)" curl -sS -X PUT \ @@ -70,10 +58,15 @@ jobs: echo "Uploaded version ${VERSION}" - name: Update latest tag + if: gitea.ref == 'refs/heads/main' run: | curl -sS -X PUT \ -H "Authorization: token ${{ secrets.TC_GITEA_TOKEN }}" \ -H "Content-Type: application/octet-stream" \ "${{ vars.GIT_MAIN_URL }}/api/packages/${{ gitea.actor }}/generic/ratatoskr/latest/ratatoskr" \ --data-binary @ratatoskr - echo "Updated 'latest' tag" \ No newline at end of file + echo "Updated 'latest' tag" + + - name: Store binary (PR only) + if: gitea.ref != 'refs/heads/main' + run: ls -lh ratatoskr \ No newline at end of file