-
Notifications
You must be signed in to change notification settings - Fork 23
47 lines (40 loc) · 1.04 KB
/
Copy pathbuild-release.yaml
File metadata and controls
47 lines (40 loc) · 1.04 KB
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
46
47
name: build-release
on:
push:
branches:
- main
paths-ignore:
- ".github/**"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Repo checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Bump version and push tag
id: bump
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: main
- name: Fetch tags
if: steps.bump.outputs.new_tag != ''
run: git fetch --force --tags
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: 1.24.x
- name: Run GoReleaser
if: steps.bump.outputs.new_tag != ''
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ steps.bump.outputs.new_tag }}