Skip to content

Commit

Permalink
feat(ci): release using goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Sep 22, 2023
1 parent d5e71ba commit fb2d15b
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

on:
push:
tags:
- v*.*.*

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: ^1
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: goreleaser/goreleaser-action@v5
with:
version: latest
distribution: goreleaser
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
SCOOP_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
36 changes: 36 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json

before:
hooks:
- go mod tidy

builds:
- skip: true

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\\(deps\\)*:+.*$"
order: 300
- title: "New Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 100
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 200
- title: "Documentation updates"
regexp: "^.*docs[(\\w)]*:+.*$"
order: 400
- title: Other work
order: 9999

0 comments on commit fb2d15b

Please sign in to comment.