Skip to content

Commit e993bcb

Browse files
committed
Write doc
1 parent b8ee9c8 commit e993bcb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

_gem/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Following tasks are generated
4949
* `rake go:test`
5050
* `rake go:testrace`
5151
* `rake go:fmt`
52+
* `rake go:build_envs`
5253

5354
#### Example (With config)
5455
```ruby
@@ -68,6 +69,7 @@ Following tasks are generated
6869
* `rake go5:test`
6970
* `rake go5:testrace`
7071
* `rake go5:fmt`
72+
* `rake go5:build_envs`
7173

7274
#### Example (Add additional tasks)
7375
```ruby
@@ -89,6 +91,24 @@ namespace :go do
8991
end
9092
```
9193

94+
#### Example (Use [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action))
95+
```yml
96+
jobs:
97+
go-lint:
98+
runs-on: ubuntu-latest
99+
100+
steps:
101+
- uses: actions/checkout@v4
102+
- uses: actions/setup-go@v5
103+
- uses: ruby/setup-ruby@v1
104+
105+
- name: export CGO_CFLAGS for golangci-lint
106+
run: bundle exec rake go:build_envs[CGO_CFLAGS] >> $GITHUB_ENV
107+
108+
- name: Run golangci-lint
109+
uses: golangci/golangci-lint-action@v6
110+
```
111+
92112
#### Available configurations
93113
* `task_namespace` : task namespace (default: `:go`)
94114
* `go_bin_path` : path to go binary (default: `"go"`)

0 commit comments

Comments
 (0)