-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.11 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
39
40
41
42
43
44
45
name: goreleaser
permissions:
contents: write
on:
push:
tags:
- "v*.*.*"
# Validate on develop, main, and master branches that the releaser
# is working as expected.
pull_request:
branches:
- develop
- main
- master
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.12'
check-latest: true
- name: Release dry run
if: github.event_name == 'pull_request'
run: make release-dry-run
- name: setup release environment
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: Release publish
# Do not publish the release for pull requests.
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make release