Skip to content

Commit d67a311

Browse files
committed
ci: add GoReleaser config and release workflow
1 parent c71f511 commit d67a311

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.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+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v6
25+
with:
26+
distribution: goreleaser
27+
version: "~> v2"
28+
args: release --clean
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
GOPRIVATE: github.com/GoCodeAlone/*
32+
GONOSUMCHECK: github.com/GoCodeAlone/*

.goreleaser.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2
2+
3+
project_name: workflow-plugin-github
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- id: workflow-plugin-github
11+
main: ./cmd/workflow-plugin-github
12+
binary: workflow-plugin-github
13+
env:
14+
- CGO_ENABLED=0
15+
- GOPRIVATE=github.com/GoCodeAlone/*
16+
goos:
17+
- linux
18+
- darwin
19+
- windows
20+
goarch:
21+
- amd64
22+
- arm64
23+
24+
archives:
25+
- id: workflow-plugin-github
26+
builds:
27+
- workflow-plugin-github
28+
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
29+
files:
30+
- plugin.json
31+
32+
checksum:
33+
name_template: "checksums.txt"
34+
35+
release:
36+
github:
37+
owner: GoCodeAlone
38+
name: workflow-plugin-github

0 commit comments

Comments
 (0)