-
Notifications
You must be signed in to change notification settings - Fork 77
62 lines (56 loc) · 2.19 KB
/
release.yml
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16'
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Deps
run: |
sudo apt-get update -y
sudo apt install reprepro createrepo rsync openvpn -y
mkdir -p /tmp/protoc
pushd /tmp/protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.7/protoc-3.15.7-linux-x86_64.zip
unzip protoc-3.15.7-linux-x86_64.zip
popd
sudo chmod +x /tmp/protoc/bin/protoc
sudo cp /tmp/protoc/bin/protoc /usr/bin/protoc
sudo cp -r /tmp/protoc/include/* /usr/local/include/
sudo chmod -R 777 /usr/local/include/google
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
go install github.com/kevinburke/go-bindata/go-bindata@latest
go install github.com/goreleaser/nfpm/cmd/nfpm@latest
- name: Dist
run: VERSION=${{ steps.get_version.outputs.VERSION }} make dist
- name: Make DEB Repo
run: |
mkdir -p ./repo/deb/conf
cp ./contrib/deb-repo-config ./repo/deb/conf/distributions
cp ./dist/*.deb ./repo/deb
reprepro -b ./repo/deb/ includedeb ovpm ./repo/deb/*.deb
- name: Make RPM Repo
run: |
mkdir -p ./repo/rpm/
cp ./contrib/yumrepo.repo ./repo/rpm/ovpm.repo
cp ./dist/*.rpm ./repo/rpm
createrepo --database ./repo/rpm
- name: Publish to GithubPages
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: repo