Skip to content

Commit

Permalink
Resolve issues with goreleaser action [v0.2.3] (#11)
Browse files Browse the repository at this point in the history
* resolve gorelease build

* quote 'tag' in release.yaml

* add ldflags to goreleaser config

* move template to own package to fix builds

* add CHANGELOG entry for v0.2.3 release

* GHA release only on tags
  • Loading branch information
alehechka authored Jul 31, 2022
1 parent 259aefe commit 4938ea4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

push_bsr_plugins:
if: github.ref_type == 'tag'
runs-on: ubuntu-latest

steps:
Expand Down
21 changes: 21 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
builds:
- main: ./protoc-gen-graphql/main.go
id: protoc-gen-graphql
binary: protoc-gen-graphql
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}}
archives:
- name_template: '{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
format: binary
replacements:
amd64: x86_64
dist: _output
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## [v0.2.3](https://github.com/alehechka/grpc-graphql-gateway/releases/tag/v0.2.3)

- Resolve issues with goreleaser action [v0.2.3] ([#11](https://github.com/alehechka/grpc-graphql-gateway/pull/11))

## [v0.2.2](https://github.com/alehechka/grpc-graphql-gateway/releases/tag/v0.2.2)

- GitHub Action Workflows - Pull Request Verification ([#7](https://github.com/alehechka/grpc-graphql-gateway/pull/7))
Expand Down
3 changes: 2 additions & 1 deletion protoc-gen-graphql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// nolint: staticcheck
"github.com/alehechka/grpc-graphql-gateway/protoc-gen-graphql/generator"
"github.com/alehechka/grpc-graphql-gateway/protoc-gen-graphql/spec"
"github.com/alehechka/grpc-graphql-gateway/protoc-gen-graphql/template"
"github.com/golang/protobuf/proto"
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
)
Expand Down Expand Up @@ -82,7 +83,7 @@ func main() {
}
}
if len(ftg) > 0 {
genFiles, err := g.Generate(goTemplate, ftg)
genFiles, err := g.Generate(template.GoTemplate, ftg)
if err != nil {
genError = err
return
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4938ea4

Please sign in to comment.