-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from ysugimoto/use-github-actions
Use GitHub actions
- Loading branch information
Showing
17 changed files
with
132 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build application | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
tags-ignore: | ||
- "v*.*.*" | ||
|
||
env: | ||
PROTOC_VERSION: 3.14.0 | ||
GO_VERSION: 1.21.1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Setup protobuf | ||
run: | | ||
PROTOC_ZIP=protoc-${{ env.PROTOC_VERSION }}-linux-x86_64.zip | ||
curl -OL https://github.com/google/protobuf/releases/download/v${{ env.PROTOC_VERSION }}/$PROTOC_ZIP | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local/protoc | ||
sudo chmod +xr -R /usr/local/protoc | ||
sudo ln -s /usr/local/protoc/bin/protoc /usr/local/bin | ||
sudo ln -s /usr/local/protoc/include/google /usr/local/include/google | ||
- name: Lint programs | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54 | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
skip-go-installation: true | ||
- name: Build app | ||
run: | | ||
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 | ||
make all tag=ci | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Publish application | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: | ||
PROTOC_VERSION: 3.14.0 | ||
GO_VERSION: 1.21.1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Setup protobuf | ||
run: | | ||
PROTOC_ZIP=protoc-${{ env.PROTOC_VERSION }}-linux-x86_64.zip | ||
curl -OL https://github.com/google/protobuf/releases/download/v${{ env.PROTOC_VERSION }}/$PROTOC_ZIP | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local/protoc | ||
sudo chmod +xr -R /usr/local/protoc | ||
sudo ln -s /usr/local/protoc/bin/protoc /usr/local/bin | ||
sudo ln -s /usr/local/protoc/include/google /usr/local/include/google | ||
- name: Lint programs | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54 | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
skip-go-installation: true | ||
- name: Set version | ||
id: version | ||
run: | | ||
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g") | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Build app | ||
run: | | ||
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 | ||
make all tag=${{ steps.version.outputs.version }} | ||
- name: Release app | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
dist/protoc-gen-graphql.darwin | ||
dist/protoc-gen-graphql.darwin.arm64 | ||
dist/protoc-gen-graphql.linux | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
module github.com/ysugimoto/grpc-graphql-gateway | ||
|
||
go 1.15 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0 | ||
github.com/graphql-go/graphql v0.7.8 | ||
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/stretchr/testify v1.6.1 | ||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect | ||
google.golang.org/grpc v1.27.0 | ||
google.golang.org/protobuf v1.21.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
golang.org/x/net v0.0.0-20190311183353-d8887717615a // indirect | ||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect | ||
golang.org/x/text v0.3.0 // indirect | ||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters