diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1545a35..e25f26f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ on: push: tags: - '*' + workflow_dispatch: jobs: x86_64: @@ -28,6 +29,16 @@ jobs: run: | make all static vpp + - name: Commit & Push version.go + uses: actions-js/push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: main + force: true + author_email: si@kskb.eu.org + author_name: KusakabeSi + message: update version.go + - uses: actions/upload-artifact@v2 with: name: etherguard-x86_64 diff --git a/Makefile b/Makefile index 716213e..054839c 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,7 @@ generate-version-and-build: tag="$$(git describe 2>/dev/null)" && \ ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \ [ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \ - echo "$$ver" > version.go && \ - git update-index --assume-unchanged version.go || true + echo "$$ver" > version.go || true @$(MAKE) etherguard-go etherguard-go: $(wildcard *.go) $(wildcard */*.go) @@ -33,8 +32,7 @@ vpp: tag="$$(git describe 2>/dev/null)" && \ ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \ [ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \ - echo "$$ver" > version.go && \ - git update-index --assume-unchanged version.go || true + echo "$$ver" > version.go || true @$(MAKE) etherguard-go-vpp etherguard-go-vpp: export CGO_CFLAGS ?= -I/usr/include/memif @@ -50,8 +48,7 @@ static: tag="$$(git describe 2>/dev/null)" && \ ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \ [ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \ - echo "$$ver" > version.go && \ - git update-index --assume-unchanged version.go || true + echo "$$ver" > version.go || true @$(MAKE) etherguard-go-static install: etherguard-go diff --git a/version.go b/version.go index e1d4a03..8f49866 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package main -const Version = "0.0.20210424" +const Version = "v0.3.4"