Skip to content

Commit

Permalink
cd: add goreleaser and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gszr committed Jul 22, 2023
1 parent f9a7b9d commit d88680a
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
out
dot
dist

dist/
49 changes: 49 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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 }}"

0 comments on commit d88680a

Please sign in to comment.