Skip to content

Commit 30a1f6f

Browse files
authored
Merge pull request #7 from alibaba/chore/ci-add-revive-and-goreleaser-check
ci: add revive lint and goreleaser dry-run jobs
2 parents bda2335 + ff6d6d2 commit 30a1f6f

2 files changed

Lines changed: 47 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@ name: CI
33
on:
44
push:
55
branches: [main]
6+
paths-ignore:
7+
- 'docs/**'
8+
- '*.md'
9+
- '.github/workflows/docs.yml'
610
pull_request:
711
branches: [main]
12+
paths-ignore:
13+
- 'docs/**'
14+
- '*.md'
15+
- '.github/workflows/docs.yml'
816

917
permissions:
1018
contents: read
@@ -66,3 +74,36 @@ jobs:
6674
uses: golangci/golangci-lint-action@v8
6775
with:
6876
version: v2.11.4
77+
78+
- name: Install revive
79+
run: go install github.com/mgechev/revive@v1.10.0
80+
81+
- name: revive
82+
run: revive -config revive.toml ./...
83+
84+
release-dryrun:
85+
name: GoReleaser Check
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
with:
90+
fetch-depth: 0
91+
92+
- uses: actions/setup-go@v5
93+
with:
94+
go-version: "1.25.x"
95+
cache: true
96+
97+
- name: GoReleaser check
98+
uses: goreleaser/goreleaser-action@v6
99+
with:
100+
distribution: goreleaser
101+
version: "~> v2"
102+
args: check
103+
104+
- name: GoReleaser snapshot build
105+
uses: goreleaser/goreleaser-action@v6
106+
with:
107+
distribution: goreleaser
108+
version: "~> v2"
109+
args: release --snapshot --clean --skip=publish

.goreleaser.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ builds:
2424

2525
archives:
2626
- id: default
27-
builds:
27+
ids:
2828
- skill-up
29-
format: tar.gz
29+
formats:
30+
- tar.gz
3031
format_overrides:
3132
- goos: windows
32-
format: zip
33+
formats:
34+
- zip
3335
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
3436

3537
checksum:
3638
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
3739

3840
snapshot:
39-
name_template: "{{ incpatch .Version }}-snapshot"
41+
version_template: "{{ incpatch .Version }}-snapshot"
4042

4143
changelog:
4244
use: github

0 commit comments

Comments
 (0)