forked from TrueCloudLab/certificates
[action] Rename some steps and fix version calculation for actions
This commit is contained in:
parent
9652a89629
commit
1748b2b6c6
2 changed files with 13 additions and 4 deletions
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -68,7 +68,7 @@ jobs:
|
||||||
prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
|
prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
|
||||||
|
|
||||||
goreleaser:
|
goreleaser:
|
||||||
name: Create Release & Upload Assets
|
name: Upload Assets To Github w/ goreleaser
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: create_release
|
needs: create_release
|
||||||
steps:
|
steps:
|
||||||
|
@ -92,7 +92,7 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
|
|
||||||
release_deb:
|
release_deb:
|
||||||
name: Build & Release Debian package
|
name: Build & Upload Debian Package To Github
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: create_release
|
needs: create_release
|
||||||
steps:
|
steps:
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -20,7 +20,7 @@ all: lint test build
|
||||||
|
|
||||||
ci: lintcgo testcgo build
|
ci: lintcgo testcgo build
|
||||||
|
|
||||||
.PHONY: all travis
|
.PHONY: all ci
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
# Bootstrapping
|
# Bootstrapping
|
||||||
|
@ -39,6 +39,15 @@ bootstra%:
|
||||||
# If TRAVIS_TAG is set then we know this ref has been tagged.
|
# If TRAVIS_TAG is set then we know this ref has been tagged.
|
||||||
ifdef TRAVIS_TAG
|
ifdef TRAVIS_TAG
|
||||||
VERSION := $(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)
|
NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc)
|
||||||
ifeq ($(NOT_RC),)
|
ifeq ($(NOT_RC),)
|
||||||
PUSHTYPE := release-candidate
|
PUSHTYPE := release-candidate
|
||||||
|
@ -62,6 +71,7 @@ DEB_VERSION := $(shell echo $(VERSION) | sed 's/-/~/g')
|
||||||
|
|
||||||
ifdef V
|
ifdef V
|
||||||
$(info TRAVIS_TAG is $(TRAVIS_TAG))
|
$(info TRAVIS_TAG is $(TRAVIS_TAG))
|
||||||
|
$(info GITHUB_REF is $(GITHUB_REF))
|
||||||
$(info VERSION is $(VERSION))
|
$(info VERSION is $(VERSION))
|
||||||
$(info DEB_VERSION is $(DEB_VERSION))
|
$(info DEB_VERSION is $(DEB_VERSION))
|
||||||
$(info PUSHTYPE is $(PUSHTYPE))
|
$(info PUSHTYPE is $(PUSHTYPE))
|
||||||
|
@ -270,7 +280,6 @@ bundle-darwin: binary-darwin
|
||||||
# Targets for creating step artifacts
|
# Targets for creating step artifacts
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
# This command is called by travis directly *after* a successful build
|
|
||||||
docker-artifacts: docker-$(PUSHTYPE)
|
docker-artifacts: docker-$(PUSHTYPE)
|
||||||
|
|
||||||
.PHONY: docker-artifacts
|
.PHONY: docker-artifacts
|
||||||
|
|
Loading…
Add table
Reference in a new issue