Update build.yml
This commit is contained in:
parent
ef1b2ef364
commit
56c91c28b3
34
.github/workflows/go.yml
vendored
34
.github/workflows/go.yml
vendored
@ -1,10 +1,8 @@
|
||||
name: Go
|
||||
name: Github CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
@ -12,19 +10,17 @@ jobs:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go mod tidy
|
||||
|
||||
- name: Build
|
||||
run: go build -o myurls main.go
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: /bin/sh -c "chmod +x release.sh && bash release.sh"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: myurls-linux-amd64.tar.gz
|
||||
path: build/linux-amd64.tar.gz
|
||||
|
||||
@ -10,4 +10,3 @@ tar -czvf linux-amd64.tar.gz myurls
|
||||
mv linux-amd64.tar.gz build/
|
||||
|
||||
rm -rf myurls
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user