diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..ebe416c --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,29 @@ +name: goreleaser + +on: + push: + tags: + - 'v*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2fd5a59..0db7521 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .*.sw[opa] *~ /build/ +/dist/ check_by_* .env* .idea/* diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..6e2e1fc --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,33 @@ +# See documentation at https://goreleaser.com +before: + hooks: + - go mod download +builds: + - goos: + - linux + - windows + - darwin + env: + - CGO_ENABLED=0 +release: + github: + owner: Icinga + name: check_by_powershell +archives: + - format: binary + replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: '{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'