Skip to content

Commit 74958fb

Browse files
committed
chore: add github release workflows
1 parent 0c47e93 commit 74958fb

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/release-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Test
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '**.go'
8+
- '**.mod'
9+
10+
jobs:
11+
release-test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: 1.19
22+
23+
- name: Release on GitHub
24+
uses: goreleaser/goreleaser-action@v6
25+
with:
26+
args: release --clean --snapshot
27+
version: latest
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release Binary
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- v*
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: 1.19
21+
22+
- name: Release on GitHub
23+
uses: goreleaser/goreleaser-action@v6
24+
with:
25+
args: release --clean
26+
version: latest
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
31+
32+
33+
34+

0 commit comments

Comments
 (0)