-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (56 loc) · 1.7 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
name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
setup:
runs-on: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.17'
- name: Install Protoc
uses: arduino/setup-protoc@v1
- run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- uses: bufbuild/buf-setup-action@v0.6.0
- run: make install
release:
runs-on: ["ubuntu-latest"]
needs: setup
steps:
- uses: actions/checkout@v2
- uses: bufbuild/buf-setup-action@v0.6.0
- uses: bufbuild/buf-push-action@v1
with:
buf_token: ${{ secrets.BUF_TOKEN }}
- uses: actions/create-release@v1.0.0
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: false
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
builds:
runs-on: ["ubuntu-latest"]
needs: release
strategy:
matrix:
GOARCH: ["386", "amd64"]
GOOS: ["linux", "windows"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.17'
- run: GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -o protoc-gen-go-sql-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: protoc-gen-go-sql-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
tag: ${{ github.ref }}
asset_name: protoc-gen-go-sql-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
overwrite: false
prerelease: false