-
-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (37 loc) · 961 Bytes
/
on-tag.yaml
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
39
40
41
42
43
name: Release a tag
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
name: Create a release with goreleaser
runs-on: ubuntu-latest
steps:
- name: Check Actor
if: github.actor != 'netr0m'
run: exit 1
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}-${{ hashFiles('go.sum') }}
restore-keys: |
go-${{ runner.os }}-
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean --timeout=30m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}