diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0e82e5c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + release: + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # necessary for the goreleaser changelog gen + - name: Release + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: v1.19.2 + args: --clean + env: + GORELEASER_CURRENT_TAG: ${{ github.ref_name }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 586dd4e..f421dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ out dot +dist + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..361e980 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,49 @@ +builds: + - id: dot + goarch: + - arm64 + - amd64 + goos: + - linux + - darwin + +archives: + - format: binary + name_template: "{{.Binary}}-{{.Os}}-{{.Arch}}-{{.Version}}" + +changelog: + sort: asc + use: github + filters: + exclude: + - "^test:" + - "^chore" + - "merge conflict" + - Merge pull request + - Merge remote-tracking branch + - Merge branch + - go mod tidy + groups: + - title: Dependency updates + regexp: '^.*?(feat|fix)\(deps\)!?:.+$' + order: 300 + - title: "New Features" + regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' + order: 100 + - title: "Bug fixes" + regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' + order: 200 + - title: "Build process updates" + regexp: ^.*?build(\([[:word:]]+\))??!?:.+$ + order: 400 + - title: Other work + order: 9999 + +release: + footer: | + **Full Changelog**: https://github.com/gszr/dot/compare/{{ .PreviousTag }}...{{ .Tag }} + github: + owner: gszr + name: dot + target_commitish: "{{ .Commit }}" +