From 1748b2b6c638cb5f2a9b26a7ffe66518b42113dc Mon Sep 17 00:00:00 2001 From: max furman Date: Mon, 22 Feb 2021 21:25:40 -0800 Subject: [PATCH] [action] Rename some steps and fix version calculation for actions --- .github/workflows/release.yml | 4 ++-- Makefile | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74787a99..dc65b334 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ jobs: prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }} goreleaser: - name: Create Release & Upload Assets + name: Upload Assets To Github w/ goreleaser runs-on: ubuntu-20.04 needs: create_release steps: @@ -92,7 +92,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAT }} release_deb: - name: Build & Release Debian package + name: Build & Upload Debian Package To Github runs-on: ubuntu-20.04 needs: create_release steps: diff --git a/Makefile b/Makefile index 66921ade..37539348 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ all: lint test build ci: lintcgo testcgo build -.PHONY: all travis +.PHONY: all ci ######################################### # Bootstrapping @@ -39,6 +39,15 @@ bootstra%: # If TRAVIS_TAG is set then we know this ref has been tagged. ifdef TRAVIS_TAG VERSION := $(TRAVIS_TAG) +NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc) + ifeq ($(NOT_RC),) +PUSHTYPE := release-candidate + else +PUSHTYPE := release + endif +# GITHUB Actions +else ifdef GITHUB_REF +VERSION := $(shell echo $(GITHUB_REF) | sed 's/^refs\/tags\///') NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc) ifeq ($(NOT_RC),) PUSHTYPE := release-candidate @@ -62,6 +71,7 @@ DEB_VERSION := $(shell echo $(VERSION) | sed 's/-/~/g') ifdef V $(info TRAVIS_TAG is $(TRAVIS_TAG)) +$(info GITHUB_REF is $(GITHUB_REF)) $(info VERSION is $(VERSION)) $(info DEB_VERSION is $(DEB_VERSION)) $(info PUSHTYPE is $(PUSHTYPE)) @@ -270,7 +280,6 @@ bundle-darwin: binary-darwin # Targets for creating step artifacts ################################################# -# This command is called by travis directly *after* a successful build docker-artifacts: docker-$(PUSHTYPE) .PHONY: docker-artifacts