diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b007274 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release +on: + release: + types: + - published + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + id: go + + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + with: + version: latest + args: release --rm-dist \ No newline at end of file diff --git a/goreleaser.yml b/goreleaser.yml new file mode 100644 index 0000000..27c796b --- /dev/null +++ b/goreleaser.yml @@ -0,0 +1,35 @@ +builds: + - main: ./cmd/doco/main.go + binary: doco + env: + - CGO_ENABLED=0 + goos: + - darwin + - linux + - windows + goarch: + - amd64 + - 386 + - arm + - arm64 + goarm: + - 6 + - 7 +archives: + - name_template: "doco_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" + replacements: + '386': i386 + darwin: Darwin + linux: Linux + windows: Windows + amd64: x86_64 +checksum: + name_template: checksums.txt +snapshot: + name_template: '{{ .Tag }}-next' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' \ No newline at end of file