-
-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (39 loc) · 1012 Bytes
/
release.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 new version
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.20"
- name: Run tests
run: go test -v ./...
- uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: develop
- name: Merge the new version into develop
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch --tags origin
git merge ${REF##*/}
git push
env:
REF: ${{ github.event.push.ref }}