diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 04b1a59..4a9a9c2 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -6,23 +6,35 @@ permissions: contents: read jobs: - test: + prepare: + name: Prepare runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - uses: actions/setup-go@v6 + - name: Checkout + uses: actions/checkout@v6 + - name: Setup Go + uses: actions/setup-go@v6 with: go-version-file: 'go.mod' check-latest: false - #- name: golangci-lint - # uses: golangci/golangci-lint-action@v9 - # with: - # go-version: ${{ matrix.go }} - # version: v2.6 + - name: Download modules + run: go mod download + - name: Make build directory + run: mkdir -p build && readlink -f build + +# test: +# runs-on: ubuntu-latest +# steps: +# - name: Lint +# uses: golangci/golangci-lint-action@v9 +# with: +# go-version: ${{ matrix.go }} +# version: v2.6 build: name: Build runs-on: ubuntu-latest + needs: prepare strategy: matrix: include: @@ -36,15 +48,6 @@ jobs: goarch: arm goarm: "7" steps: - - name: Debug env - run: env | sort - - name: Checkout - uses: actions/checkout@v6 - - name: Setup Go - uses: actions/setup-go@v6 - with: - go-version-file: 'go.mod' - check-latest: false - name: Set target variables run: | echo "GOOS=${{ matrix.goos }}" >> $GITHUB_ENV @@ -52,10 +55,6 @@ jobs: if [ -n "${{ matrix.goarm }}" ]; then echo "GOARM=${{ matrix.goarm }}" >> $GITHUB_ENV fi - - name: Download modules - run: go mod download - - name: Make build directory - run: mkdir -p build && readlink -f build - name: Build run: go build -o build/hamview-receiver.${{ matrix.goarch }}${{ matrix.goarm }} . && readlink -f build/hamview-receiver.${{ matrix.goarch }}${{ matrix.goarm }} - name: Set up Docker Buildx