diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c6b3e56 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Build + run: go build ./... + + - name: Test + run: go test ./... diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..6f13d5d --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,71 @@ +version: 2 + +project_name: wazuh-cli + +before: + hooks: + - go mod tidy + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + ldflags: + - -s -w -X main.version={{.Version}} + binary: wazuh-cli + +archives: + - formats: + - tar.gz + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + formats: + - zip + files: + - README.md + - LICENSE + +checksum: + name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" + algorithm: sha256 + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^ci:" + - Merge pull request + - Merge branch + +release: + github: + owner: 0xbbuddha + name: wazuh-cli + name_template: "v{{ .Version }}" + draft: false + prerelease: auto + +# Homebrew tap - requires a separate repo: github.com/0xbbuddha/homebrew-wazuh-cli +# Uncomment once the tap repo is created. +# brews: +# - repository: +# owner: 0xbbuddha +# name: homebrew-wazuh-cli +# directory: Formula +# homepage: https://github.com/0xbbuddha/wazuh-cli +# description: Interactive REPL for the Wazuh REST API +# license: MIT +# test: | +# system "#{bin}/wazuh-cli version"