Skip to content

Commit b411624

Browse files
committed
build: setup release task
1 parent a4aa8ae commit b411624

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest] # macos-latest, windows-latest
15+
os: [ubuntu-latest, macos-latest, windows-latest]
1616
steps:
1717
- name: Set up Go 1.x
1818
uses: actions/setup-go@v2
@@ -21,7 +21,7 @@ jobs:
2121
id: go
2222

2323
- name: Check out code into the Go module directory
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525

2626
- name: Install make (Windows)
2727
if: runner.os == 'Windows'

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- uses: actions/setup-go@v3
22+
with:
23+
go-version: '>=1.19.2'
24+
cache: true
25+
26+
- uses: goreleaser/goreleaser-action@v2
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: release --rm-dist
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
# vendor/
1616

1717
/bin/
18+
/dist/
1819
coverage.txt
1920
lint-project.sh

0 commit comments

Comments
 (0)