Skip to content

Commit

Permalink
feat(releaser): add goreleaser configuration and action
Browse files Browse the repository at this point in the history
  • Loading branch information
shipengqi committed Apr 19, 2024
1 parent ae4aaf3 commit 0a5970c
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "release a version"
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # it is required fot the changelog to work correctly
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
distribution: goreleaser
version: latest
args: release --debug --clean

35 changes: 35 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
builds:
- # If true, skip the build.
# Useful for library projects.
skip: true
changelog:
sort: asc
use: github
filters:
exclude:
- '^Merge'
groups:
- title: 'New Features'
regexp: "^.*feat.*:+.*$"
order: 100
- title: 'Bug Fixes'
regexp: "^.*fix.*:+.*$"
order: 200
- title: 'Dependency Updates'
regexp: "^.*(feat|fix)\\(deps\\)*:+.*$"
order: 300
- title: 'Documentation Updates'
regexp: "^.*docs.*:+.*$"
order: 400
- title: Other work
order: 9999
release:
footer: |
**Full Changelog**: https://github.com/shipengqi/component-base/compare/{{ .PreviousTag }}...{{ .Tag }}
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/bytedance/sonic v1.11.5 h1:G00FYjjqll5iQ1PYXynbg/hyzqBqavH8Mo9/oTopd9k=
github.com/bytedance/sonic v1.11.5/go.mod h1:X2PC2giUdj/Cv2lliWFLk6c/DUQok5rViJSemeB0wDw=
github.com/bytedance/sonic/loader v0.1.0 h1:skjHJ2Bi9ibbq3Dwzh1w42MQ7wZJrXmEZr/uqUn3f0Q=
github.com/bytedance/sonic/loader v0.1.0/go.mod h1:UmRT+IRTGKz/DAkzcEGzyVqQFJ7H9BqwBO3pm9H/+HY=
github.com/bytedance/sonic/loader v0.1.0 h1:OKAxO0q8jbZcj7R5YzXaRXyScPY0IyYuoLRAcbczPxk=
github.com/bytedance/sonic/loader v0.1.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cloudwego/base64x v0.1.3 h1:b5J/l8xolB7dyDTTmhJP2oTs5LdrjyrUFuNxdfq5hAg=
github.com/cloudwego/base64x v0.1.3/go.mod h1:1+1K5BUHIQzyapgpF7LwvOGAEDicKtt1umPV+aN8pi8=
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
Expand Down

0 comments on commit 0a5970c

Please sign in to comment.