From 2330b724510af0cf68f4f0bd1230ed977d55ca0b Mon Sep 17 00:00:00 2001 From: Declan Freeman-Gleason Date: Sun, 10 Jan 2021 15:57:16 -0800 Subject: [PATCH] When describing the current commit, exclude the Dev tag (#226) * When describing the current release, exclude the Dev tag * Only run the release task on non-dev tags (i.e. real release tags) --- .github/workflows/main.yml | 4 +--- photon-server/versioningHelper.gradle | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6538bc77f..652fafb3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,8 +7,6 @@ name: CI on: push: branches: [ master ] - tags: - - '*' pull_request: branches: [ master ] @@ -208,7 +206,7 @@ jobs: ./gradlew spotlessCheck release: - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/v') needs: [build-package] runs-on: ubuntu-latest steps: diff --git a/photon-server/versioningHelper.gradle b/photon-server/versioningHelper.gradle index 5c37dbc37..84fa29875 100644 --- a/photon-server/versioningHelper.gradle +++ b/photon-server/versioningHelper.gradle @@ -8,7 +8,7 @@ gradle.allprojects { String tagIsh try { exec { - commandLine 'git', 'describe', '--tags' + commandLine 'git', 'describe', '--tags', '--exclude="Dev"' standardOutput = stdout } tagIsh = stdout.toString().trim().toLowerCase()