fix: save the version when building manually

This commit is contained in:
GenZmeY 2020-12-11 15:57:24 +03:00
parent 9cc9af1759
commit 67648811a5
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ jobs:
go-version: '1.13.0'
- name: Build
run: make -j $(nproc) compile VERSION=${{ steps.get_version.outputs.VERSION }}
run: make -j $(nproc) compile
- name: create release
id: create_release
@ -32,7 +32,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
release_name: multini ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false

View File

@ -1,5 +1,5 @@
NAME = multini
VERSION = dev_$(shell date +%F_%T)
VERSION := $(shell git describe)
GOCMD = go
LDFLAGS := "$(LDFLAGS) -s -w -X 'main.Version=$(VERSION)'"
GOBUILD = $(GOCMD) build -ldflags=$(LDFLAGS)