summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2020-06-05 12:23:15 -0400
committerGitHub <noreply@github.com>2020-06-05 10:23:15 -0600
commit21c1da101cf9a8dc586fc8cf20e1769e79e49eea (patch)
tree9ba09971f39650ce6686a8550fe78f91cfc93d45
parent7a99835dab64f7864186185761bbf5194216f8b6 (diff)
ci: Disable publishing .deb on beta tags (#3473)
-rw-r--r--.github/workflows/release.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5f6af50..f947472 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -41,6 +41,18 @@ jobs:
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
echo "::set-output name=go_cache::$(go env GOCACHE)"
+ # Parse semver
+ TAG=${GITHUB_REF/refs\/tags\//}
+ SEMVER_RE='[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z\.-]*\)'
+ TAG_MAJOR=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\1#"`
+ TAG_MINOR=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\2#"`
+ TAG_PATCH=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\3#"`
+ TAG_SPECIAL=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\4#"`
+ echo "::set-output name=tag_major::${TAG_MAJOR}"
+ echo "::set-output name=tag_minor::${TAG_MINOR}"
+ echo "::set-output name=tag_patch::${TAG_PATCH}"
+ echo "::set-output name=tag_special::${TAG_SPECIAL}"
+
- name: Cache the build cache
uses: actions/cache@v1
with:
@@ -59,7 +71,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.vars.outputs.version_tag }}
+ # Only publish on non-special tags (e.g. non-beta)
- name: Publish .deb to Gemfury
+ if: ${{ steps.vars.outputs.tag_special }} == ""
env:
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}
run: |