Update build.yml
This commit is contained in:
parent
ef1b2ef364
commit
56c91c28b3
18
.github/workflows/go.yml
vendored
18
.github/workflows/go.yml
vendored
@ -1,10 +1,8 @@
|
|||||||
name: Go
|
name: Github CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@ -12,19 +10,17 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.13
|
- name: Set up Go 1.13
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.13
|
go-version: 1.13
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Get dependencies
|
|
||||||
run: |
|
|
||||||
go mod tidy
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -o myurls main.go
|
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/
|
mv linux-amd64.tar.gz build/
|
||||||
|
|
||||||
rm -rf myurls
|
rm -rf myurls
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user