Skip to content

Commit fb7e93a

Browse files
committed
build: upgrade goreleaser to v2
1 parent fd8b816 commit fb7e93a

File tree

3 files changed

+27
-44
lines changed

3 files changed

+27
-44
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,25 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
# See https://goreleaser.com/ci/actions/#fetch-depthness
1413
- name: Checkout code
15-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1615
with:
1716
fetch-depth: 0
1817
- run: git fetch --force --tags
1918
- name: Set up Go
2019
uses: actions/setup-go@v3
2120
with:
22-
go-version: "1.20"
21+
go-version: "stable"
2322
cache: true
24-
check-latest: true
2523
- name: Get release tag
2624
id: get_version
2725
uses: battila7/get-version-action@v2
2826
- name: Run GoReleaser
29-
uses: goreleaser/goreleaser-action@v2.6.1
27+
uses: goreleaser/goreleaser-action@v6
3028
with:
3129
distribution: goreleaser
32-
version: latest
33-
args: --snapshot --rm-dist
30+
version: ~v2
31+
args: --snapshot --clean
3432
- name: Login to GitHub Packages Docker Registry
3533
uses: docker/login-action@v1
3634
with:

.github/workflows/release.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,34 @@ name: release
33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- "v*.*.*"
77
workflow_dispatch:
88

99
jobs:
1010
release:
1111
runs-on: ubuntu-latest
1212
steps:
13-
# See https://goreleaser.com/ci/actions/#fetch-depthness
1413
- name: Checkout code
15-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1615
with:
1716
fetch-depth: 0
1817
- run: git fetch --force --tags
1918
- name: Set up Go
20-
uses: actions/setup-go@v3
19+
uses: actions/setup-go@v5
2120
with:
22-
go-version: '^1.20'
21+
go-version: "stable"
2322
cache: true
24-
check-latest: true
2523
- name: Login to DockerHub
2624
uses: docker/login-action@v1
2725
with:
2826
registry: docker.io
2927
username: ${{ secrets.DOCKERHUB_USERNAME }}
3028
password: ${{ secrets.DOCKERHUB_TOKEN }}
3129
- name: Run GoReleaser
32-
uses: goreleaser/goreleaser-action@v2.6.1
30+
uses: goreleaser/goreleaser-action@v6
3331
with:
3432
distribution: goreleaser
35-
version: latest
36-
args: --rm-dist
33+
version: ~v2
34+
args: release --clean
3735
env:
3836
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}

.goreleaser.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: 2
2+
13
project_name: meteor
24

35
release:
@@ -25,34 +27,19 @@ builds:
2527
- -X github.com/raystack/meteor/cmd.Version={{.Tag}}
2628
- -X github.com/raystack/meteor/cmd.BuildCommit={{.FullCommit}}
2729
- -X github.com/raystack/meteor/cmd.BuildDate={{.Date}}
28-
goos: [linux]
29-
goarch: [amd64, arm64] # skip goarch 386 and arm due to conflicts with "github.com/blastrain/vitess-sqlparser" library
30-
env:
31-
- CGO_ENABLED=0
32-
- main: ./main.go
33-
id: "darwin"
34-
binary: meteor
35-
flags: [-a]
36-
ldflags:
37-
- -X github.com/raystack/meteor/cmd.Version={{.Tag}}
38-
- -X github.com/raystack/meteor/cmd.BuildCommit={{.FullCommit}}
39-
- -X github.com/raystack/meteor/cmd.BuildDate={{.Date}}
40-
goos: [darwin]
41-
goarch: [amd64, 386, arm, arm64]
42-
env:
43-
- CGO_ENABLED=0
44-
- main: ./main.go
45-
id: "windows"
46-
binary: meteor
47-
flags: [-a]
48-
ldflags:
49-
- -X github.com/raystack/meteor/cmd.Version={{.Tag}}
50-
- -X github.com/raystack/meteor/cmd.BuildCommit={{.FullCommit}}
51-
- -X github.com/raystack/meteor/cmd.BuildDate={{.Date}}
52-
goos: [windows]
30+
goos: ["linux", "windows"]
5331
goarch: [amd64, arm64] # skip goarch 386 and arm due to conflicts with "github.com/blastrain/vitess-sqlparser" library
5432
env:
5533
- CGO_ENABLED=0
34+
ignore: # skip goarch 386 and arm due to conflicts with "github.com/blastrain/vitess-sqlparser" library
35+
- goos: linux
36+
goarch: 386
37+
- goos: linux
38+
goarch: arm
39+
- goos: windows
40+
goarch: 386
41+
- goos: windows
42+
goarch: arm
5643

5744
archives:
5845
- id: "archives"
@@ -91,19 +78,19 @@ scoops:
9178
- homepage: "https://github.com/raystack/meteor"
9279
description: "Metadata collection tool."
9380
license: Apache 2.0
94-
bucket:
81+
repository:
9582
owner: raystack
9683
name: scoop-bucket
9784

9885
brews:
9986
- name: meteor
10087
homepage: "https://github.com/raystack/meteor"
10188
description: "Metadata collection tool."
102-
tap:
89+
repository:
10390
owner: raystack
10491
name: homebrew-tap
10592
license: "Apache 2.0"
106-
folder: Formula
93+
directory: Formula
10794
dependencies:
10895
- name: git
10996
install: |-

0 commit comments

Comments
 (0)