From aaba297ffa9954ba2a157c35bda428b3fbe580c5 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 16 Jun 2020 16:12:30 +0200 Subject: [PATCH] GH Actions release + Changelog integration (#4) --- .github/workflows/build.yml | 9 +++++++-- build.gradle.kts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7a7bc1..f48fa3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,7 +90,12 @@ jobs: run: | echo "::set-output name=version::$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')" echo "::set-output name=name::$(./gradlew properties --no-daemon --console=plain -q | grep "^name:" | awk '{printf $2}')" - echo "::set-output name=changelog::$(./gradlew getChangelog --no-daemon --console=plain -q)" + + CHANGELOG=$(./gradlew getChangelog --no-daemon --unreleased --no-header --console=plain -q) + CHANGELOG="${CHANGELOG//'%'/'%25'}" + CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" + CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + echo "::set-output name=changelog::$CHANGELOG" # Build artifact using buildPlugin Gradle task - name: Build Plugin run: ./gradlew buildPlugin --no-daemon @@ -134,7 +139,7 @@ jobs: # If accepted and published, release workflow would be triggered. releaseDraft: name: Release Draft -# if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' needs: [build, verify] runs-on: ubuntu-latest steps: diff --git a/build.gradle.kts b/build.gradle.kts index 7cbe3a4..082aa94 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin id("org.jetbrains.intellij") version "0.4.21" // gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin - id("org.jetbrains.changelog") version "0.3.0" + id("org.jetbrains.changelog") version "0.3.1" // detekt linter - read more: https://detekt.github.io/detekt/kotlindsl.html id("io.gitlab.arturbosch.detekt") version "1.10.0-RC1" }