From 6394da03767e6dad566ac408eb99b0c5988fea5d Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 20 Jun 2020 23:35:43 +1200 Subject: [PATCH] Trigger git tag (#6) * Create and push tag from master branch * Bump 0.2.1 -> 0.2.2 --- .github/workflows/ci.yml | 11 ++++++----- app_store_scraper/__version__.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fcba7b..19904b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,7 @@ jobs: with: fetch-depth: 0 - name: Check for version bump - id: check_version - if: ${{ contains(github.head_ref, 'release') }} + if: ${{ startsWith(github.head_ref, 'release') }} run: | VERSION=$(echo -n $(git diff origin/${{ github.base_ref }} -G '__version__' app_store_scraper/__version__.py)) VERSION=$(echo "$VERSION" | sed -E "s/.*\+__version__.*([0-9]+\.[0-9]+\.[0-9]+).+/\1/") @@ -55,14 +54,16 @@ jobs: echo "Bump __version__ for release" exit 1 else - echo "::set-env name=VERSION::$VERSION" echo "Version: $VERSION" exit 0 fi - name: Create tag if: github.ref == 'refs/heads/master' run: | + VERSION=$(echo -n $(git diff HEAD^1 -G '__version__' app_store_scraper/__version__.py)) + VERSION=$(echo "$VERSION" | sed -E "s/.*\+__version__.*([0-9]+\.[0-9]+\.[0-9]+).+/\1/") if [ "$VERSION" != "" ]; then - git tag v$VERSION - git push origin v$VERSION + echo "Create and push v$VERSION tag" + git tag v"$VERSION" + git push origin v"$VERSION" fi diff --git a/app_store_scraper/__version__.py b/app_store_scraper/__version__.py index e3c3333..954f1fc 100644 --- a/app_store_scraper/__version__.py +++ b/app_store_scraper/__version__.py @@ -1,5 +1,5 @@ __title__ = "app-store-scraper" -__version__ = "0.2.1" +__version__ = "0.2.2" __description__ = "Single API ☝ App Store Review Scraper 🧹" __author__ = "Eric Lim" __url__ = "https://github.com/cowboy-bebug/app-store-scraper"