Skip to content

Commit edc76fe

Browse files
authored
chore: fix auto release
1 parent 558054e commit edc76fe

File tree

2 files changed

+55
-18
lines changed

2 files changed

+55
-18
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
9+
jobs:
10+
11+
tag:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
uses: actions/checkout@v2
16+
-
17+
uses: go-semantic-release/action@v1
18+
with:
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
goreleaser:
22+
runs-on: ubuntu-latest
23+
needs: tag
24+
steps:
25+
-
26+
name: Checkout
27+
uses: actions/checkout@v2
28+
-
29+
name: Unshallow
30+
run: git fetch --prune --unshallow
31+
-
32+
id: versions
33+
run: |
34+
echo ::set-output name=go::$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2)
35+
echo "Using Go version ${{ steps.versions.outputs.go }}"
36+
-
37+
name: Set up Go
38+
uses: actions/setup-go@v2
39+
with:
40+
go-version: ${{ steps.versions.outputs.go }}
41+
-
42+
name: Login to GitHub Container Registry
43+
uses: docker/login-action@v1
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.repository_owner }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
-
49+
name: Release
50+
uses: goreleaser/goreleaser-action@v2
51+
with:
52+
version: latest
53+
args: release --config=.github/goreleaser.yml --rm-dist
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tag.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)