From 823d2db7519c734c2d65483d1ba2f2f349b676d6 Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 14:32:19 +0100 Subject: [PATCH 1/2] Add goreleaser for binary releases - Update module path to github.com/freelabz/jswhois - Add .goreleaser.yml for cross-platform builds - Add GitHub Actions workflows for release automation - Add .gitignore for build artifacts Co-Authored-By: Claude Opus 4.6 --- .github/release.yml | 17 +++++++++++++++ .github/workflows/release-binary.yml | 30 ++++++++++++++++++++++++++ .github/workflows/release-test.yml | 28 ++++++++++++++++++++++++ .gitignore | 1 + .goreleaser.yml | 32 ++++++++++++++++++++++++++++ go.mod | 2 +- 6 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 .github/release.yml create mode 100644 .github/workflows/release-binary.yml create mode 100644 .github/workflows/release-test.yml create mode 100644 .gitignore create mode 100644 .goreleaser.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..bc11730 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,17 @@ +changelog: + exclude: + authors: + - dependabot + categories: + - title: New Features + labels: + - "Type: Enhancement" + - title: Bug Fixes + labels: + - "Type: Bug" + - title: Maintenance + labels: + - "Type: Maintenance" + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml new file mode 100644 index 0000000..242f64e --- /dev/null +++ b/.github/workflows/release-binary.yml @@ -0,0 +1,30 @@ +name: Release Binary + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: "Check out code" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: "Set up Go" + uses: actions/setup-go@v5 + with: + go-version: 1.22.x + + - name: "Create release on GitHub" + uses: goreleaser/goreleaser-action@v4 + with: + args: "release --clean" + version: latest + workdir: . + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml new file mode 100644 index 0000000..1dfee33 --- /dev/null +++ b/.github/workflows/release-test.yml @@ -0,0 +1,28 @@ +name: Release Test + +on: + pull_request: + paths: + - '**.go' + - '**.mod' + workflow_dispatch: + +jobs: + release-test: + runs-on: ubuntu-latest + steps: + - name: "Check out code" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22.x + + - name: release test + uses: goreleaser/goreleaser-action@v4 + with: + args: "release --clean --snapshot" + version: latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b26fae --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/jswhois diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..68441b9 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,32 @@ +before: + hooks: + - go mod tidy + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - 386 + - arm + - arm64 + ignore: + - goos: darwin + goarch: '386' + - goos: windows + goarch: 'arm' + - goos: windows + goarch: 'arm64' + binary: '{{ .ProjectName }}' + main: ./jswhois.go + +archives: +- format: zip + name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}' + +checksum: + algorithm: sha256 diff --git a/go.mod b/go.mod index 178dfbe..c0fbe64 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/jschauma/jswhois +module github.com/freelabz/jswhois go 1.22.4 From a8af2d8137c930ec805d0d4f17bbcf2adcfd5357 Mon Sep 17 00:00:00 2001 From: Olivier Cervello Date: Tue, 3 Mar 2026 15:12:12 +0100 Subject: [PATCH 2/2] fix: restore original module path for upstream compatibility Replace freelabz fork reference with original jschauma/jswhois module path to prepare for upstream contribution. Co-Authored-By: Claude Opus 4.6 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c0fbe64..178dfbe 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/freelabz/jswhois +module github.com/jschauma/jswhois go 1.22.4