name: build on: push: paths-ignore: - "**.md" pull_request: paths-ignore: - "**.md" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build-targets: name: Build runs-on: ubuntu-latest strategy: fail-fast: false matrix: targets: - Target: linux/386 - Target: linux/amd64 - Target: linux/arm - Target: linux/arm64 - Target: linux/loong64 - Target: linux/ppc64le - Target: linux/riscv64 - Target: linux/s390x - Target: linux/mips CGO: true - Target: linux/mips64 CGO: true - Target: linux/mips64le CGO: true - Target: linux/mipsle CGO: true - Target: darwin/amd64 - Target: darwin/arm64 - Target: windows/386 - Target: windows/amd64 - Target: windows/arm64 - Target: freebsd/386 - Target: freebsd/amd64 - Target: freebsd/arm - Target: freebsd/arm64 - Target: openbsd/amd64 - Target: openbsd/arm64 - Target: netbsd/amd64 steps: - name: Checkout uses: actions/checkout@v4 with: submodules: true - name: Setup Go uses: actions/setup-go@v5 with: go-version: "1.23" - name: Build targets uses: zijiren233/go-build-action@v1 env: SUBMICRO_ARM_DISABLED: true MICRO_ARM64_DISABLED: true with: targets: ${{ matrix.targets.Target }} cgo-enabled: ${{ matrix.targets.CGO }} enable-micro: true config-args: --skip-init-web - name: Get artifact name id: get_artifact_name run: | echo "ARTIFACT_NAME=$(echo ${{ matrix.targets.Target }} | tr ':' '-' | tr '/' '-')" >> $GITHUB_OUTPUT - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: ${{ steps.get_artifact_name.outputs.ARTIFACT_NAME }} path: build/*