Skip to content

Commit 0868092

Browse files
authored
Merge pull request #10 from gomicro/fix-build
fix build
2 parents 0d5a216 + cbfa301 commit 0868092

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build
22
on: [push]
33

4+
env:
5+
GO_VERSION: "1.24"
6+
47
jobs:
58

69
linting:
@@ -26,7 +29,7 @@ jobs:
2629
- name: Install Go
2730
uses: actions/setup-go@v5
2831
with:
29-
go-version: "1.20"
32+
go-version: ${{ env.GO_VERSION }}
3033

3134
- name: Checkout
3235
uses: actions/checkout@v4
@@ -50,27 +53,27 @@ jobs:
5053
- name: Install Go
5154
uses: actions/setup-go@v5
5255
with:
53-
go-version: "1.20"
56+
go-version: "${{ env.GOLANG_VERSION }}"
5457

5558
- name: Checkout
5659
uses: actions/checkout@v4
5760
with:
5861
fetch-depth: 0
5962

6063
- name: Login to Docker Registry
61-
uses: docker/login-action@v1
64+
uses: docker/login-action@v3
6265
with:
6366
registry: ghcr.io
6467
username: ${{ github.repository_owner }}
6568
password: ${{ secrets.GITHUB_TOKEN }}
6669

6770
- name: Snapshot
68-
uses: goreleaser/goreleaser-action@v2
71+
uses: goreleaser/goreleaser-action@v6
6972
with:
7073
args: release --snapshot
7174

7275
- name: Release
7376
if: startsWith(github.ref, 'refs/tags/')
74-
uses: goreleaser/goreleaser-action@v2
77+
uses: goreleaser/goreleaser-action@v6
7578
with:
7679
args: release --rm-dist

.golangci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ run:
66
linters:
77
enable:
88
- errcheck
9-
- exportloopref
109
- gofmt
10+
- copyloopvar
1111
- gosimple
1212
- govet
1313
- ineffassign
@@ -20,10 +20,8 @@ linters:
2020
- unparam
2121
disable:
2222
- wsl
23-
- maligned
2423
- prealloc
2524
- gochecknoglobals
26-
- scopelint
2725
disable-all: false
2826
presets:
2927
- bugs

forge.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
project:
22
name: align
3+
34
steps:
45
build:
56
help: Build the project
@@ -12,12 +13,15 @@ steps:
1213
-X 'github.com/gomicro/align/cmd.clientID=$ALIGN_CLIENT_ID'
1314
-X 'github.com/gomicro/align/cmd.clientSecret=$ALIGN_CLIENT_SECRET'"
1415
-o {{.Project}} .
16+
1517
clean:
1618
help: Clean up all generated files
1719
cmd: go clean
20+
1821
lint:
1922
help: Run golangci-lint
2023
cmd: golangci-lint run
24+
2125
install:
2226
help: Install the binary
2327
envs:
@@ -28,10 +32,12 @@ steps:
2832
"-X 'github.com/gomicro/align/cmd.Version=dev-$(git rev-parse --short HEAD)'
2933
-X 'github.com/gomicro/align/cmd.clientID=$ALIGN_CLIENT_ID'
3034
-X 'github.com/gomicro/align/cmd.clientSecret=$ALIGN_CLIENT_SECRET'"
35+
3136
test:
3237
help: Run all available tests
3338
steps:
3439
- unit test
40+
3541
unit_test:
3642
help: Run the unit tests
3743
cmd: go test ./...

0 commit comments

Comments
 (0)