diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3a1a23e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.25' + cache: true + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..1013304 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,58 @@ +# .goreleaser.yaml +version: 2 + +before: + hooks: + - go mod tidy + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + main: ./cmd/grepturbo/main.go + binary: grepturbo + +archives: + - format: tar.gz + # this name template makes the result look like grepturbo_1.0.0_linux_amd64.tar.gz + name_template: >- + {{ .ProjectName }}_ + {{- .Version }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +checksum: + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ .Tag }}-next" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + - '^chore:' + - 'Merge pull request' + - 'Merge branch' + +release: + github: + owner: yanurag-dev + name: GrepTurbo + draft: false + prerelease: auto + mode: replace diff --git a/README.md b/README.md index 9c3f462..5b16718 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,16 @@ Tested on the Go standard library source (~10,000 files): ## Install +### Pre-compiled Binaries (Recommended) + +Download the latest binary for your platform from the [Releases](https://github.com/yanurag-dev/GrepTurbo/releases) page. + +### From Source + ```bash git clone https://github.com/yanurag-dev/GrepTurbo cd GrepTurbo -go build -o GrepTurbo ./cmd/GrepTurbo +go build -o grepturbo ./cmd/grepturbo ``` ---