diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06daf5a..d719a49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,11 +61,14 @@ jobs: CHANGELOG="${CHANGELOG//'%'/'%25'}" CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + echo "::set-output name=version::$VERSION" echo "::set-output name=name::$NAME" echo "::set-output name=changelog::$CHANGELOG" echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" + ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier + # Run tests - name: Run Tests run: ./gradlew test @@ -80,7 +83,7 @@ jobs: # Cache Plugin Verifier IDEs - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v2.1.6 + uses: actions/cache@v2.1.7 with: path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} @@ -99,7 +102,7 @@ jobs: # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v4.1.0 + uses: JetBrains/qodana-action@v4.2.3 # Prepare plugin archive content for creating artifact - name: Prepare Plugin Artifact @@ -109,7 +112,9 @@ jobs: cd ${{ github.workspace }}/build/distributions FILENAME=`ls *.zip` unzip "$FILENAME" -d content - echo "::set-output name=filename::$FILENAME" + + echo "::set-output name=filename::${FILENAME:0:-4}" + # Store already-built plugin as an artifact for downloading - name: Upload artifact uses: actions/upload-artifact@v2.2.4 @@ -138,6 +143,7 @@ jobs: gh api repos/{owner}/{repo}/releases \ --jq '.[] | select(.draft == true) | .id' \ | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} + # Create new release draft - which is not publicly visible and requires manual acceptance - name: Create Release Draft env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ac0b21..8c8661e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,11 +37,13 @@ jobs: ${{ github.event.release.body }} EOM )" - + CHANGELOG="${CHANGELOG//'%'/'%25'}" CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" + echo "::set-output name=changelog::$CHANGELOG" + # Update Unreleased section with the current release note - name: Patch Changelog if: ${{ steps.properties.outputs.changelog != '' }} @@ -49,6 +51,7 @@ jobs: CHANGELOG: ${{ steps.properties.outputs.changelog }} run: | ./gradlew patchChangelog --release-note="$CHANGELOG" + # Publish the plugin to the Marketplace - name: Publish Plugin env: @@ -69,11 +72,14 @@ jobs: run: | VERSION="${{ github.event.release.tag_name }}" BRANCH="changelog-update-$VERSION" + git config user.email "action@github.com" git config user.name "GitHub Action" + git checkout -b $BRANCH git commit -am "Changelog update - $VERSION" git push --set-upstream origin $BRANCH + gh pr create \ --title "Changelog update - \`$VERSION\`" \ --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 1196556..342516d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Changed - Improve exception handling on IO operations +- Update dependencies ### Fixed - Character unescaping for '.properties' files diff --git a/build.gradle.kts b/build.gradle.kts index 8939baf..36b33dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,9 +7,9 @@ plugins { // Java support id("java") // Kotlin support - id("org.jetbrains.kotlin.jvm") version "1.6.0" + id("org.jetbrains.kotlin.jvm") version "1.6.10" // Gradle IntelliJ Plugin - id("org.jetbrains.intellij") version "1.3.0" + id("org.jetbrains.intellij") version "1.3.1" // Gradle Changelog Plugin id("org.jetbrains.changelog") version "1.3.1" // Gradle Qodana Plugin diff --git a/gradle.properties b/gradle.properties index b42490d..e3051e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,7 +23,7 @@ platformPlugins = org.jetbrains.kotlin, JavaScriptLanguage, org.jetbrains.plugin javaVersion = 11 # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 7.3 +gradleVersion = 7.3.3 # Opt-out flag for bundling Kotlin standard library. # See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..fe753c9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file