name: release on: push: tags: - "v*" jobs: release: name: Release 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: Get version id: get_version run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT - 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: --version="v${{ steps.get_version.outputs.VERSION }}" - name: Release uses: softprops/action-gh-release@v2 with: token: ${{ secrets.GITHUB_TOKEN }} draft: false prerelease: ${{ contains(steps.get_version.outputs.VERSION, 'rc') || contains(steps.get_version.outputs.VERSION, 'beta') || contains(steps.get_version.outputs.VERSION, 'alpha') }} append_body: false fail_on_unmatched_files: true name: "Version ${{ steps.get_version.outputs.VERSION }}" tag_name: "v${{ steps.get_version.outputs.VERSION }}" files: | build/*