add version to build artifact
This commit is contained in:
parent
c071df2a31
commit
7a456dcac4
11
.github/workflows/build-test.yml
vendored
11
.github/workflows/build-test.yml
vendored
|
@ -3,8 +3,6 @@ name: "Build & Test"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
# schedule:
|
|
||||||
# - cron: '0 21 * * 6'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -14,14 +12,17 @@ jobs:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '^1.14.2'
|
go-version: '^1.14.2'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o build/wings_linux_amd64 -v wings.go
|
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -ldflags "-X system.Version=dev-${GIT_COMMIT:0:7}" -o build/wings_linux_amd64 -v wings.go
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./...
|
||||||
|
|
||||||
- name: Compress binary
|
- name: Compress binary
|
||||||
run: make compress
|
run: make compress
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
# if: ${{ github.event_name == "schedule" }}
|
|
||||||
with:
|
with:
|
||||||
name: amd64
|
name: wings_linux_amd64
|
||||||
path: build/wings_linux_amd64
|
path: build/wings_linux_amd64
|
Loading…
Reference in New Issue
Block a user