From d22dcadbcede5477a8c608a816b46ee8669f4047 Mon Sep 17 00:00:00 2001 From: kilyabin <65072190+kilyabin@users.noreply.github.com> Date: Thu, 30 Apr 2026 01:53:39 +0400 Subject: [PATCH] feat(ci): add building workflow --- .gitea/workflows/build.yml | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..4f79152 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,59 @@ +name: Build + +on: + push: + branches: + - '**' + +jobs: + build-backend: + name: Build Go Backend + runs-on: host-runner + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: apk add --no-cache go gcc musl-dev libpcap-dev + + - name: Download modules + run: go mod download + + - name: Build + run: go build -o bin/ids ./cmd/ids + + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: ids-backend + path: bin/ids + retention-days: 7 + + - name: Clean up + run: rm -rf bin/ + + build-frontend: + name: Build Nuxt Frontend + runs-on: host-runner + defaults: + run: + working-directory: frontend + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: apk add --no-cache nodejs npm && npm install + + - name: Build + run: npm run generate + + - name: Upload dist + uses: actions/upload-artifact@v4 + with: + name: ids-frontend + path: frontend/.output/public + retention-days: 7 + + - name: Clean up + run: rm -rf .output/