From a2bee72ebefb5630e0fbd1fb2862dd6325296042 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 11 Aug 2020 23:08:14 +0200 Subject: [PATCH] GitHub Actions - optimize Export Properties step --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e901e7b..ec1f94f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,8 +53,8 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle- - # Run detekt - - name: Run Linters + # Run detekt, ktlint and tests + - name: Run Linters and Test run: ./gradlew check # Run verifyPlugin Gradle task @@ -93,8 +93,9 @@ jobs: - name: Export Properties id: properties run: | - VERSION="$(./gradlew properties --console=plain -q | grep "^version:" | cut -f2- -d ' ')" - NAME="$(./gradlew properties --console=plain -q | grep "^name:" | cut -f2- -d ' ')" + PROPERTIES="$(./gradlew properties --console=plain -q)" + VERSION="$(echo $PROPERTIES | grep "^version:" | cut -f2- -d ' ')" + NAME="$(echo $PROPERTIES | grep "^name:" | cut -f2- -d ' ')" CHANGELOG=$(./gradlew getChangelog --unreleased --no-header --console=plain -q) CHANGELOG="${CHANGELOG//'%'/'%25'}" CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"