-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1.19 KB
/
goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: goreleaser
on:
workflow_dispatch:
inputs:
version:
description: Version To Tag
required: true
default: ""
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version: 1.17
- name: Set version tag
run: |
# go install github.com/miniscruff/changie@latest
# go install github.com/release-lab/whatchanged/cmd/whatchanged@latest
# whatchanged --output CHANGELOG.md
export GORELEASER_CURRENT_TAG="${{ github.event.inputs.version }}" && echo $GORELEASER_CURRENT_TAG >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}