add version to build artifact

This commit is contained in:
Jakob Schrettenbrunner 2020-07-04 23:44:22 +02:00
parent c071df2a31
commit 7a456dcac4

View File

@ -3,8 +3,6 @@ name: "Build & Test"
on:
push:
pull_request:
# schedule:
# - cron: '0 21 * * 6'
jobs:
build:
@ -14,14 +12,17 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '^1.14.2'
- 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
run: go test ./...
- name: Compress binary
run: make compress
- uses: actions/upload-artifact@v2
# if: ${{ github.event_name == "schedule" }}
with:
name: amd64
name: wings_linux_amd64
path: build/wings_linux_amd64