ci: bump Go to 1.26.4 across workflows and go.mod #68
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sin-code Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Test | |
| run: go test -v ./cmd/sin-code/... 2>&1 | tee test-output.txt | |
| - name: Vet | |
| run: go vet ./cmd/sin-code/... | |
| - name: govulncheck | |
| # Blocking — scan for known vulnerabilities in the Go module and its dependencies. | |
| run: | | |
| go install golang.org/x/vuln/cmd/govulncheck@latest | |
| govulncheck ./cmd/sin-code/... | |
| build: | |
| name: Build | |
| needs: test | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| ext: '' | |
| - goos: linux | |
| goarch: arm64 | |
| ext: '' | |
| - goos: darwin | |
| goarch: amd64 | |
| ext: '' | |
| - goos: darwin | |
| goarch: arm64 | |
| ext: '' | |
| - goos: windows | |
| goarch: amd64 | |
| ext: '.exe' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: | | |
| set -e | |
| VERSION=${GITHUB_REF_NAME} | |
| go version | |
| go env GOOS GOARCH | |
| go mod download | |
| go build -v -ldflags "-s -w -X main.Version=${VERSION} -X github.com/OpenSIN-Code/SIN-Code/cmd/sin-code/internal.ServerVersion=${VERSION}" -o sin-code${{ matrix.ext }} ./cmd/sin-code | |
| - name: Archive | |
| run: | | |
| ARCH="${{ matrix.goos }}-${{ matrix.goarch }}" | |
| mkdir -p dist | |
| ls -la sin-code${{ matrix.ext }} || echo "Binary not found" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| zip -j "dist/sin-code-${ARCH}.zip" "sin-code${{ matrix.ext }}" | |
| else | |
| tar -czf "dist/sin-code-${ARCH}.tar.gz" -C . "sin-code${{ matrix.ext }}" | |
| fi | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sin-code-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: dist/* | |
| release: | |
| name: Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| pattern: sin-code-* | |
| merge-multiple: true | |
| - name: Create checksums | |
| run: | | |
| cd artifacts | |
| sha256sum * > checksums.txt | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* | |
| body: | | |
| Unified sin-code binary with 46+ subcommands, MCP server mode, and cross-platform builds. | |
| generate_release_notes: true |