fix: save the version when building manually
This commit is contained in:
parent
9cc9af1759
commit
67648811a5
4
.github/workflows/binary-release.yml
vendored
4
.github/workflows/binary-release.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
go-version: '1.13.0'
|
go-version: '1.13.0'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make -j $(nproc) compile VERSION=${{ steps.get_version.outputs.VERSION }}
|
run: make -j $(nproc) compile
|
||||||
|
|
||||||
- name: create release
|
- name: create release
|
||||||
id: create_release
|
id: create_release
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.get_version.outputs.VERSION }}
|
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
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
NAME = multini
|
NAME = multini
|
||||||
VERSION = dev_$(shell date +%F_%T)
|
VERSION := $(shell git describe)
|
||||||
GOCMD = go
|
GOCMD = go
|
||||||
LDFLAGS := "$(LDFLAGS) -s -w -X 'main.Version=$(VERSION)'"
|
LDFLAGS := "$(LDFLAGS) -s -w -X 'main.Version=$(VERSION)'"
|
||||||
GOBUILD = $(GOCMD) build -ldflags=$(LDFLAGS)
|
GOBUILD = $(GOCMD) build -ldflags=$(LDFLAGS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user