-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (38 loc) · 1021 Bytes
/
goreleaser.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
name: Release
on:
pull_request:
push:
tags:
- "*"
jobs:
goreleaser:
permissions:
contents: write
packages: write
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- uses: actions/checkout@v4
- uses: azure/setup-helm@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (PR)
uses: goreleaser/goreleaser-action@v5
if: ${{ !startsWith(github.ref, 'refs/tags') }}
with:
args: release --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (Publish Release)
uses: goreleaser/goreleaser-action@v5
if: ${{ startsWith(github.ref , 'refs/tags') }}
with:
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}