Skip to content

Commit 0c7e5be

Browse files
authored
ci: add a release workflow (#23)
1 parent db58777 commit 0c7e5be

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright (c) 2023 - 2024 Purple Clay
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
name: release
22+
on:
23+
push:
24+
tags:
25+
- "v*.*.*"
26+
jobs:
27+
goreleaser:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
actions: read
31+
contents: write
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: GoReleaser
39+
uses: goreleaser/goreleaser-action@v5
40+
with:
41+
version: latest
42+
args: release --rm-dist
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GH_GORELEASER }}

.goreleaser.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright (c) 2023 - 2024 Purple Clay
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
builds:
22+
- skip: true
23+
24+
changelog:
25+
sort: desc
26+
use: github
27+
filters:
28+
exclude:
29+
- "^test"
30+
- "^chore"
31+
- "^ci"
32+
groups:
33+
- title: "Dependency Updates"
34+
regexp: "^.*feat\\(deps\\)*:+.*$"
35+
order: 30
36+
- title: "New Features"
37+
regexp: "^.*feat[(\\w)]*:+.*$"
38+
order: 10
39+
- title: "Bug Fixes"
40+
regexp: "^.*fix[(\\w)]*:+.*$"
41+
order: 20
42+
- title: "Documentation Updates"
43+
regexp: "^.*docs[(\\w)]*:+.*$"
44+
order: 40
45+
- title: "Other Work"
46+
order: 99
47+
48+
release:
49+
footer: |
50+
**Full Changelog**: https://github.com/purpleclay/chomp/compare/{{ .PreviousTag }}...{{ .Tag }}
51+
## What to do next?
52+
- Follow me on [Twitter](https://twitter.com/purpleclaydev)
53+
- Follow me on [Fosstodon](https://fosstodon.org/@purpleclaydev)

0 commit comments

Comments
 (0)