-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (61 loc) · 2 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: read
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: goreleaser/goreleaser-action@v3
with:
args: release --rm-dist --skip-docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push_bsr_plugins:
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: plugins.buf.build
username: alehechka
password: ${{ secrets.BUF_BUILD_TOKEN }}
- name: Set protobuf-version
run: echo ::set-output name=version::$(go list -m -f '{{.Version}}' google.golang.org/protobuf)
id: protobuf-version
- name: Set grpc-version
run: echo ::set-output name=version::$(go list -m -f '{{.Version}}' google.golang.org/grpc)
id: grpc-version
- uses: docker/build-push-action@v3
with:
push: true
tags: plugins.buf.build/alehechka/grpc-graphql-gateway:${{ github.ref_name }}-1
platforms: linux/amd64
build-args: |
RELEASE_VERSION=${{ github.ref_name }}
GO_PROTOBUF_RELEASE_VERSION=${{ steps.protobuf-version.outputs.version }}
GO_GRPC_RELEASE_VERSION=${{ steps.grpc-version.outputs.version }}
push_bsr_repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1
- name: Build Protobuf sources
run: buf build
working-directory: proto
- name: Push Repository
run: BUF_TOKEN="${{ secrets.BUF_BUILD_TOKEN }}" buf push --tag "${{ github.ref_name }}"
working-directory: proto/grpc-graphql-gateway