Skip to content

Commit

Permalink
chore(project): generate release on GitHub Actions (#988)
Browse files Browse the repository at this point in the history
Trigger `goreleaser` action when a tag is pushed
Also, remove `CHANGELOG.md`, since the changelog associated with
the releases/tags on GitHub has the same content.

Fixes #964

Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon authored Mar 20, 2022
1 parent 13cc003 commit e0ecee8
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 366 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 22 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,34 @@ builds:
- "-s -w -X github.com/bytesparadise/libasciidoc.BuildTag={{.Version}} -X github.com/bytesparadise/libasciidoc.BuildCommit={{.Commit}} -X github.com/bytesparadise/libasciidoc.BuildTime={{.Date}}"
env:
- CGO_ENABLED=0
archive:
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64

archives:
- id: default
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ .Tag }}-next"

changelog:
use: github
sort: asc
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Others
order: 999
filters:
exclude:
- '^docs:'
Expand Down
Loading

0 comments on commit e0ecee8

Please sign in to comment.