From 6596db7257758e72d9b2f25441b23f81dc641655 Mon Sep 17 00:00:00 2001 From: Meta Gowork Date: Sat, 2 Apr 2022 19:01:28 +0800 Subject: [PATCH] [Chore] workflows --- .github/workflows/{alpha.yml => release.yml} | 10 +++++----- Makefile | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{alpha.yml => release.yml} (92%) diff --git a/.github/workflows/alpha.yml b/.github/workflows/release.yml similarity index 92% rename from .github/workflows/alpha.yml rename to .github/workflows/release.yml index 4e4efc72..0aa2235c 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/release.yml @@ -44,18 +44,18 @@ jobs: - name: Tag Repo uses: richardsimko/update-tag@v1 with: - tag_name: alpha + tag_name: v1.10.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Alpha + - name: Upload Release uses: softprops/action-gh-release@v1 - if: ${{ env.GIT_BRANCH != 'Meta' && success() }} + if: ${{ env.GIT_BRANCH == 'Meta' && success() }} with: tag: ${{ github.ref }} - tag_name: alpha + tag_name: v1.10.0 files: bin/* - prerelease: true + prerelease: false - name: send telegram message on push uses: appleboy/telegram-action@master diff --git a/Makefile b/Makefile index 75cc46d0..f5928c60 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ NAME=Clash.Meta BINDIR=bin BRANCH=$(shell git rev-parse --abbrev-ref HEAD) -VERSION=alpha-$(shell git rev-parse --short HEAD) +VERSION=$(shell git describe --tags || echo "unknown version") BUILDTIME=$(shell date -u) GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/Dreamacro/clash/constant.Version=$(VERSION)" \ -X "github.com/Dreamacro/clash/constant.BuildTime=$(BUILDTIME)" \