- added workflow for releasing
This commit is contained in:
Tiger Wang (王豫)
2022-08-06 22:52:14 -04:00
committed by GitHub
parent e2b617e510
commit 7792496f2d
4 changed files with 112 additions and 18 deletions
+41
View File
@@ -0,0 +1,41 @@
name: goreleaser
on:
push:
branches:
- main
tags:
- v*.*.*
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}