diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6ea3811 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +# .github/workflows/release.yml +name: goreleaser + +on: + pull_request: + push: + # run only against tags + tags: + - "*" + +permissions: + contents: write + # packages: write + # issues: write + # id-token: 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: stable + # More assembly might be required: Docker logins, GPG, etc. + # It all depends on your needs. + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + + diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f48ea06..32ce009 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,17 +12,20 @@ before: hooks: # You may remove this if you don't use go modules. - go mod tidy - # you may remove this if you don't need go generate - - go generate ./... + builds: + - env: - CGO_ENABLED=0 + id: openstatus + main: ./cmd/openstatus goos: - linux - windows - darwin - - main: ./cmd/openstatus + binary: openstatus + archives: - format: tar.gz @@ -39,9 +42,40 @@ archives: - goos: windows format: zip + # replacements: + # darwin: Darwin + # linux: Linux + # windows: Windows + # 386: i386 + # amd64: x86_64 changelog: sort: asc filters: exclude: - "^docs:" - "^test:" + +brews: + - + name: openstatus + directory: Formula + homepage: https://www.openstatus.dev + skip_upload: auto + description: "OpenStatus CLI" + + repository: + # Repository owner. + # + # Templates: allowed. + owner: openstatusHQ + + # Repository name. + # + # Templates: allowed. + name: homebrew-tap + + # Optionally a branch can be provided. + # + # Default: default repository branch. + # Templates: allowed. + branch: main