Skip to content

Commit d51be38

Browse files
committed
Upated
1 parent 7bfa0b4 commit d51be38

17 files changed

Lines changed: 2081 additions & 768 deletions

File tree

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
golangci-lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version-file: go.mod
21+
22+
- name: golangci-lint
23+
uses: golangci/golangci-lint-action@v6
24+
with:
25+
version: latest

.github/workflows/release.yml

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

.gitignore

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,20 @@
1-
### Go template
2-
# If you prefer the allow list template instead of the deny list, see community template:
3-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
4-
#
5-
# Binaries for programs and plugins
1+
# Binary
2+
struct2jsdoc
3+
4+
# IDE
5+
.idea/
6+
7+
# Go
68
*.exe
79
*.exe~
810
*.dll
911
*.so
1012
*.dylib
11-
12-
# Test binary, built with `go test -c`
1313
*.test
14-
15-
# Output of the go coverage tool, specifically when used with LiteIDE
1614
*.out
1715

18-
# Dependency directories (remove the comment below to include it)
19-
# vendor/
20-
21-
# Go workspace file
22-
go.work
23-
go.work.sum
24-
25-
# env file
26-
.env
27-
28-
.idea/
29-
30-
# ignore generated binary
31-
struct2jsdoc
32-
33-
# ignore any JS files that can be generated by running the code
34-
*.js
16+
# Dependency directories
17+
vendor/
3518

19+
# GoReleaser
20+
dist/

.goreleaser.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: 2
2+
3+
project_name: struct2jsdoc
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- darwin
15+
- windows
16+
goarch:
17+
- amd64
18+
- arm64
19+
ldflags:
20+
- -s -w -X main.version={{.Version}}
21+
22+
archives:
23+
- format: tar.gz
24+
name_template: >-
25+
{{ .ProjectName }}_
26+
{{- .Version }}_
27+
{{- .Os }}_
28+
{{- .Arch }}
29+
format_overrides:
30+
- goos: windows
31+
format: zip
32+
33+
checksum:
34+
name_template: "checksums.txt"
35+
36+
changelog:
37+
sort: asc
38+
filters:
39+
exclude:
40+
- "^docs:"
41+
- "^test:"
42+
- "^chore:"

0 commit comments

Comments
 (0)