Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
altitude committed Jun 14, 2021
1 parent 2610166 commit 4040c7f
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
release:
types:
- created

name: release (linux/static)
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- arch: amd64
cc: gcc

env:
GOOS: linux
GOARCH: ${{ matrix.arch }}

steps:
- uses: actions/setup-go@v2
with:
go-version: '1.16'

- uses: actions/checkout@v2

- name: get deps
run: go get

- id: get-release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}

- name: build
run: |
CGO_ENABLED=1 go build -o numary
tar -czvf numary-${{ steps.release.outputs.tag_name }}-${{ env.GOOS }}-${{ env.GOARCH }}.tar.gz numary
- name: upload release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: numary-${{ steps.release.outputs.tag_name }}-${{ env.GOOS }}-${{ env.GOARCH }}.tar.gz
asset_name: numary-${{ steps.release.outputs.tag_name }}-${{ env.GOOS }}-${{ env.GOARCH }}.tar.gz
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.16'

- uses: actions/checkout@v2

- name: get deps
run: go get

- name: run tests
run: go test -v -coverprofile=coverage.out ./...

0 comments on commit 4040c7f

Please sign in to comment.