-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Travis -> GHA * Publish, too * Update .github/workflows/test.yml Co-authored-by: Josh Raker <[email protected]> --------- Co-authored-by: Josh Raker <[email protected]>
- Loading branch information
1 parent
d075d54
commit 51bb0f5
Showing
3 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
push: | ||
branches: | ||
- main | ||
- master | ||
release: | ||
types: [published] | ||
|
||
env: | ||
GOFLAGS: "-mod=vendor" | ||
|
||
jobs: | ||
test-and-publish: | ||
name: Test and Publish | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.14' | ||
|
||
- name: Setup | ||
run: go mod vendor | ||
|
||
- name: Test | ||
run: | | ||
make fmt | ||
git diff --exit-code | ||
make test | ||
- name: Build | ||
run: | | ||
mkdir -p dist | ||
export GOOS="linux" | ||
export CGO_ENABLED=0 | ||
export GOARCH="amd64" | ||
go build && mv chkbundle "chkbundle-${GOOS}-${GOARCH}" | ||
sha1sum chkbundle-* > chkbundle.sum | ||
- name: Publish artifact | ||
if: github.event_name == 'release' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: | | ||
chkbundle-* | ||
chkbundle.sum |
This file was deleted.
Oops, something went wrong.
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