Skip to content

Commit a2b54e7

Browse files
committed
ci(release): Add GoReleaser matrix and GitHub Actions pipeline
1 parent 299952c commit a2b54e7

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: qxctl-release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: stable
21+
22+
- name: Run GoReleaser
23+
uses: goreleaser/goreleaser-action@v5
24+
with:
25+
distribution: goreleaser
26+
version: latest
27+
args: release --clean
28+
workdir: server/cli/qxctl
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

server/cli/qxctl/.goreleaser.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
project_name: qxctl
3+
builds:
4+
- env:
5+
- CGO_ENABLED=0
6+
goos:
7+
- linux
8+
- windows
9+
- darwin
10+
goarch:
11+
- amd64
12+
- arm64
13+
main: ./main.go
14+
archives:
15+
- format: tar.gz
16+
name_template: >-
17+
{{ .ProjectName }}_
18+
{{- title .Os }}_
19+
{{- if eq .Arch "amd64" }}x86_64
20+
{{- else if eq .Arch "386" }}i386
21+
{{- else }}{{ .Arch }}{{ end }}
22+
checksum:
23+
name_template: 'checksums.txt'
24+
snapshot:
25+
name_template: "{{ incpatch .Version }}-next"
26+
changelog:
27+
sort: asc
28+
filters:
29+
exclude:
30+
- '^docs:'
31+
- '^test:'

0 commit comments

Comments
 (0)