-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (41 loc) · 971 Bytes
/
release.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
name: Release
on:
push:
branches:
- main
jobs:
tagpr:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- id: run-tagpr
uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
release:
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Setup GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
- name: Release
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}