From 211acd9b833a005f75143ac9f2763c752f318c69 Mon Sep 17 00:00:00 2001 From: Ignacio Rivero Date: Mon, 4 May 2026 03:36:57 -0300 Subject: [PATCH] Added Gitea build action --- .gitea/workflows/build.yml | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 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..5ff9117 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,56 @@ +name: Build + +on: + push: + branches: [main] + tags: ['v*'] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - goos: linux + goarch: amd64 + - goos: linux + goarch: arm64 + - goos: linux + goarch: arm + goarm: '7' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + cache: true + + - name: Download dependencies + run: go mod download + + - name: Vet + run: go vet ./... + + - name: Build + env: + CGO_ENABLED: '0' + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + GOARM: ${{ matrix.goarm }} + run: | + out="bleh-${GOOS}-${GOARCH}${GOARM:+v$GOARM}" + go build -trimpath -ldflags='-s -w' -o "$out" . + echo "ARTIFACT=$out" >> "$GITHUB_ENV" + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ env.ARTIFACT }} + path: ${{ env.ARTIFACT }} + if-no-files-found: error