Compare commits
No commits in common. "master" and "0.2.1" have entirely different histories.
@ -1,4 +1,4 @@
|
|||||||
name: release
|
name: build release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -10,10 +10,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get the version
|
|
||||||
id: get_version
|
|
||||||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
|
||||||
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
@ -23,7 +19,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 VERSION=${{ github.ref }}
|
||||||
|
|
||||||
- name: create release
|
- name: create release
|
||||||
id: create_release
|
id: create_release
|
||||||
@ -31,8 +27,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.get_version.outputs.VERSION }}
|
tag_name: ${{ github.ref }}
|
||||||
release_name: Release ${{ steps.get_version.outputs.VERSION }}
|
release_name: Release ${{ github.ref }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@ -1,23 +0,0 @@
|
|||||||
name: build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: '1.13.0'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: make -j $(nproc) compile
|
|
||||||
|
|
9
Makefile
9
Makefile
@ -17,16 +17,15 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
NAME = $(shell basename $(shell readlink -e .))
|
NAME = range-gen
|
||||||
VERSION = dev_$(shell date +%F_%T)
|
VERSION = dev_$(shell date +%F_%T)
|
||||||
GOCMD = go
|
GOCMD = go
|
||||||
LDFLAGS := "$(LDFLAGS) -X 'main.Version=$(VERSION)'"
|
LDFLAGS := "$(LDFLAGS) -X 'main.Version=$(VERSION)'"
|
||||||
GOBUILD = $(GOCMD) build -ldflags=$(LDFLAGS)
|
GOBUILD = $(GOCMD) build -ldflags=$(LDFLAGS)
|
||||||
SRCMAIN = ./cmd/$(NAME)
|
SRCMAIN = ./cmd/$(NAME)
|
||||||
SRCDOC = ./doc
|
|
||||||
BINDIR = bin
|
BINDIR = bin
|
||||||
BIN = $(BINDIR)/$(NAME)
|
BIN = $(BINDIR)/$(NAME)
|
||||||
README = $(SRCDOC)/README
|
README = ./doc/README
|
||||||
LICENSE = LICENSE
|
LICENSE = LICENSE
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
|
|
||||||
@ -42,8 +41,8 @@ build: prep
|
|||||||
$(GOBUILD) -o $(BIN) $(SRCMAIN)
|
$(GOBUILD) -o $(BIN) $(SRCMAIN)
|
||||||
|
|
||||||
doc: check-build
|
doc: check-build
|
||||||
test -d $(SRCDOC) || mkdir $(SRCDOC)
|
test -d ./doc || mkdir ./doc
|
||||||
$(BIN) --help > $(README)
|
$(BIN) --help > ./doc/README
|
||||||
|
|
||||||
check-build:
|
check-build:
|
||||||
test -e $(BIN)
|
test -e $(BIN)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Range-Gen
|
# Range-Gen
|
||||||
|
|
||||||
[](https://github.com/GenZmeY/range-gen/actions)
|
[](https://github.com/GenZmeY/range-gen/actions)
|
||||||
[](https://golang.org)
|
[](https://golang.org)
|
||||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||||
[](https://github.com/GenZmeY/range-gen/releases)
|
[](https://github.com/GenZmeY/range-gen/releases)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user