| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- name: Release
- on:
- push:
- tags:
- - 'v*'
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: '^1.14.6'
- - name: Get the version
- id: get_version
- run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- - name: Repo Tools
- run: |
- sudo apt-get update -y
- sudo apt install reprepro createrepo rsync -y
- mkdir -p /tmp/protoc
- pushd /tmp/protoc
- wget https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protoc-3.12.3-linux-x86_64.zip
- unzip protoc-3.12.3-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 get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
- go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
- go get -u github.com/golang/protobuf/protoc-gen-go
- go get github.com/kevinburke/go-bindata/...
- go get github.com/goreleaser/nfpm/cmd/nfpm@latest
- ls `go env GOPATH`
- - 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/github-pages-deploy-action@3.5.7
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BRANCH: gh-pages
- FOLDER: repo
|