Skip to content

Release

Release #32

Workflow file for this run

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.21.x
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Login to Github Container Registry
uses: docker/login-action@v1
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 }}