-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use github actions instead of travis
- Loading branch information
Showing
6 changed files
with
78 additions
and
40 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,27 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: install golang | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18.x | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: build assets | ||
run: make release | ||
|
||
- name: gh login | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | ||
|
||
- name: upload assets to release | ||
run: gh release upload ${{ github.event.release.tag_name }} dist/* |
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,32 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
go-version: [1.17.x, 1.18.x] | ||
|
||
steps: | ||
- name: install golang | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: install bats | ||
run: | | ||
git clone https://github.com/sstephenson/bats.git --branch v0.4.0 --depth 1 "${HOME}/bats" | ||
echo "${HOME}/bats/bin" >> $GITHUB_PATH | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: run tests | ||
run: make test |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
supercronic | ||
vendor | ||
dist/* |
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
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
|
||
mkdir -p dist | ||
export GOOS="linux" | ||
export CGO_ENABLED=0 | ||
for arch in amd64 386 arm arm64; do GOARCH="$arch" go build && file supercronic | grep 'statically linked' && mv supercronic "dist/supercronic-${GOOS}-${arch}"; done | ||
pushd dist | ||
ls -lah * | ||
file * | ||
sha1sum * | ||
sha256sum * | ||
popd |