Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce68600

Browse files
committed
chore: added pipeline for release with GoReleaser
1 parent 1c9adbb commit ce68600

3 files changed

Lines changed: 89 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Release with GoReleaser: https://goreleaser.com/ci/actions/
2+
# To publish: create and push a tag (e.g. v0.14.2)
3+
4+
name: Release
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: '1.24'
27+
28+
- name: Run GoReleaser
29+
uses: goreleaser/goreleaser-action@v6
30+
with:
31+
distribution: goreleaser
32+
version: latest
33+
args: release --clean
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# GoReleaser: https://goreleaser.com/intro/
2+
# Release: push a tag (e.g. v0.14.2) and run the workflow or goreleaser release
3+
4+
version: 2
5+
6+
project_name: aurora
7+
8+
builds:
9+
- id: aurora
10+
main: ./cmd/aurora
11+
binary: aurora
12+
ldflags:
13+
- -s -w -X github.com/guiferpa/aurora/version.VERSION={{.Version}}
14+
goos:
15+
- linux
16+
- windows
17+
- darwin
18+
goarch:
19+
- amd64
20+
- arm64
21+
22+
- id: aurorals
23+
main: ./cmd/aurorals
24+
binary: aurorals
25+
ldflags:
26+
- -s -w -X github.com/guiferpa/aurora/version.VERSION={{.Version}}
27+
goos:
28+
- linux
29+
- windows
30+
- darwin
31+
goarch:
32+
- amd64
33+
- arm64
34+
35+
archives:
36+
- format: tar.gz
37+
format_overrides:
38+
- goos: windows
39+
format: zip
40+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
41+
builds:
42+
- aurora
43+
- aurorals
44+
45+
checksum:
46+
name_template: "checksums.txt"
47+
48+
release:
49+
github:
50+
owner: guiferpa
51+
name: aurora
52+
draft: false

version/version.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
package version
22

3-
const VERSION = "0.14.1"
3+
// VERSION is set at build time via ldflags (e.g. by GoReleaser). Default for local builds.
4+
var VERSION = "dev"

0 commit comments

Comments
 (0)