Merge pull request #1 from p2p-org/security-workflow-sast #31
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
name: BUILD - lint, build and binary upload | |
on: [push] | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
# Install and setup go | |
- name: Set up Go 1.14 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.14 | |
id: go | |
# setup gopath | |
- name: Set PATH | |
run: | | |
echo "::set-env name=GOPATH::$(go env GOPATH)" | |
echo "::add-path::$(go env GOPATH)/bin" | |
shell: bash | |
# # install linter | |
# - name: install linter | |
# run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.24.0 | |
# checkout relayer | |
- name: checkout relayer | |
uses: actions/checkout@v2 | |
# setup cache | |
- uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
# # run linter | |
# - name: linter | |
# run: make ci-lint | |
# build binary | |
- name: build binary and move to upload location | |
run: make build | |
# upload resulting binaries | |
- name: upload binaries | |
uses: actions/upload-artifact@v1 | |
with: | |
name: rly | |
path: ./build/rly |