From e5cc40df37e70bb6f626a9eb09b1ee87e25d99f7 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Tue, 17 Mar 2026 09:22:10 -0400 Subject: [PATCH] fix: replace awscli/SeaweedFS with Gitea package registry upload --- .gitea/workflows/build-release.yml | 35 ++++++++++++++++++------------ 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/build-release.yml b/.gitea/workflows/build-release.yml index 7f66e21..5f96ece 100644 --- a/.gitea/workflows/build-release.yml +++ b/.gitea/workflows/build-release.yml @@ -55,7 +55,7 @@ jobs: mingw-w64 mingw-w64-tools binutils-mingw-w64 \ cmake ninja-build nasm meson \ default-jre-headless \ - python3 awscli + python3 curl # Node.js if ! command -v node >/dev/null 2>&1; then @@ -239,26 +239,33 @@ jobs: cat dist/version.json # =============================================================== - # Upload release artifacts + # Upload to Gitea Package Registry # =============================================================== - - name: Upload release artifacts + - name: Upload to Gitea packages run: | VERSION="${{ steps.version.outputs.version }}" - ENDPOINT="https://files.command.vigilcyber.com" + GITEA_URL="https://git.command.vigilcyber.com" + OWNER="vstockwell" + PACKAGE="wraith" - echo "=== Uploading Wraith ${VERSION} ===" + echo "=== Uploading Wraith ${VERSION} to Gitea packages ===" - # Versioned path - aws s3 cp dist/ "s3://agents/wraith/${VERSION}/windows/amd64/" \ - --recursive --endpoint-url "$ENDPOINT" --no-sign-request - - # Latest path - aws s3 sync dist/ "s3://agents/wraith/latest/windows/amd64/" \ - --delete --endpoint-url "$ENDPOINT" --no-sign-request + # Upload each file as a generic package + for file in dist/*; do + [ -f "$file" ] || continue + FILENAME=$(basename "$file") + echo "Uploading: ${FILENAME}" + curl -s -X PUT \ + -H "Authorization: token ${{ secrets.GIT_TOKEN }}" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"$file" \ + "${GITEA_URL}/api/packages/${OWNER}/generic/${PACKAGE}/${VERSION}/${FILENAME}" + echo " Done." + done + echo "" echo "=== Upload complete ===" - echo "Versioned: ${ENDPOINT}/agents/wraith/${VERSION}/windows/amd64/" - echo "Latest: ${ENDPOINT}/agents/wraith/latest/windows/amd64/" + echo "Package: ${GITEA_URL}/${OWNER}/-/packages/generic/${PACKAGE}/${VERSION}" echo "" echo "=== Contents ===" ls -la dist/