-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dbeaf9
commit ffdc0bd
Showing
1 changed file
with
55 additions
and
0 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,55 @@ | ||
name: ipinfo | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.13 | ||
id: go | ||
|
||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
- name: Build for linux/amd64 | ||
run: GOOS=linux GOARCH=amd64 go build -v -o ipinfo_linux_amd64 . | ||
|
||
- name: Build for linux/386 | ||
run: GOOS=linux GOARCH=386 go build -v -o ipinfo_linux_386 . | ||
|
||
- name: Build for darwin/amd64 | ||
run: GOOS=darwin GOARCH=amd64 go build -v -o ipinfo_darwin_amd64 . | ||
|
||
- name: Build for darwin/386 | ||
run: GOOS=darwin GOARCH=386 go build -v -o ipinfo_darwin_386 . | ||
|
||
- name: Build for windows/amd64 | ||
run: GOOS=windows GOARCH=amd64 go build -v -o ipinfo_windows_amd64.exe . | ||
|
||
- name: Build for windows/386 | ||
run: GOOS=windows GOARCH=386 go build -v -o ipinfo_windows_386.exe . | ||
|
||
- run: ls -alhrt ipinfo_* | ||
|
||
- name: Create Release | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: Continuous Release ${{ github.ref }} | ||
files: ipinfo_* |