-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (39 loc) · 1.06 KB
/
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
44
45
46
47
name: Release
on:
create:
tags:
- 'v*'
- '!v*-alpha'
- '!v*-beta'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: setup Go
uses: actions/setup-go@v4
with:
go-version: 1.22.x
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: release
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release
env:
# 如果需要操作其它仓库,比如将 brew 写入其它仓库中,
# 则不能使用默认的 GITHUB_TOKEN,需要自行创建。
GITHUB_TOKEN: ${{ secrets.HOMEBREW }}