Skip to content

Commit

Permalink
Merge branch 'release/1.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Jul 27, 2023
2 parents ed5853a + 6b38e0d commit 03c3bae
Show file tree
Hide file tree
Showing 18 changed files with 160 additions and 97 deletions.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Bug report
description: Create a report to help us improve

---
title: ''
labels:
- bug
assignees:
- nekofar

---
body:
- type: textarea
attributes:
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Feature request
description: Suggest an idea for this project

---
title: ''
labels:
- enhancement
assignees:
- nekofar

---
body:
- type: textarea
attributes:
Expand Down
153 changes: 115 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,24 @@ on:
workflow_dispatch:

jobs:
guard:
name: Usage guard
runs-on: ubuntu-latest
steps:
# Uses the action-usage-guard action
- name: Run Action Usage Guard
uses: nekofar/action-usage-guard@develop
with:
# GitHub access token for authentication.
token: ${{ secrets.ACCESS_TOKEN }}
# Defines the threshold for the usage guard.
threshold: 70

# Prepare environment and build the plugin
build:
name: Build
runs-on: ubuntu-latest
needs: [ guard ]
outputs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.changelog.outputs.changelog }}
Expand All @@ -51,9 +64,16 @@ jobs:
- name: Gradle Wrapper Validation
uses: gradle/[email protected]

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.6.1
uses: gradle/gradle-build-action@v2.7.0

# Set environment variables
- name: Export Properties
Expand All @@ -67,7 +87,7 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "name=$NAME" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Extract changelog information
Expand Down Expand Up @@ -106,11 +126,79 @@ jobs:
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*


# Run tests and upload a code coverage report
test:
name: Test
needs: [ build ]
runs-on: ubuntu-latest
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/[email protected]

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17

# Setup Gradle
- name: Setup Gradle
uses: gradle/[email protected]

# Run tests
- name: Run Tests
run: ./gradlew check

# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/[email protected]
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/[email protected]
with:
files: ${{ github.workspace }}/build/reports/kover/xml/report.xml

# Run Qodana inspections and provide report
inspectCode:
name: Inspect code
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/[email protected]

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/[email protected]
with:
cache-default-branch-only: true

# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
name: Verify plugin
needs: build
needs: [ build, test, inspectCode ]
runs-on: ubuntu-latest
steps:
# Remove files to save space
Expand All @@ -123,9 +211,16 @@ jobs:
- name: Fetch Sources
uses: actions/[email protected]

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.6.1
uses: gradle/gradle-build-action@v2.7.0

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
Expand All @@ -146,34 +241,12 @@ jobs:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

# Run Qodana inspections and provide report
inspectCode:
name: Inspect code
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/[email protected]

# Run Qodana inspections
- name: Qodana - Code Inspection
if: ${{ github.actor != 'dependabot[bot]' }}
uses: JetBrains/[email protected]
with:
cache-default-branch-only: true

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
releaseDraft:
name: Release draft
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/support/')
needs: [ build, verify, inspectCode ]
needs: [ build, verify ]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -183,6 +256,13 @@ jobs:
- name: Fetch Sources
uses: actions/[email protected]

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
Expand All @@ -194,16 +274,13 @@ jobs:
# Create a new release draft which is not publicly visible and requires manual acceptance
- name: Create Release Draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
${{ needs.build.outputs.changelog }}
EOM
)"
uses: nekofar/[email protected]
with:
tag: v${{ needs.build.outputs.version }} # The name of the tag to be released
title: v${{ needs.build.outputs.version }} # The title for the release
notes: ${{ needs.build.outputs.changelog }} # The release notes generated in the previous step
draft: true # The release will be created as a draft
prerelease: ${{ contains(needs.build.outputs.version, '-rc') || contains(needs.build.outputs.version, '-beta') || contains(needs.build.outputs.version, '-alpha') }} # Conditions to mark the release as a pre-release

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ jobs:

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3.11.0
uses: actions/setup-java@v3.12.0
with:
distribution: zulu
java-version: 17
cache: gradle

# Setup Gradle
- name: Setup Gradle
uses: gradle/[email protected]

# Publish the plugin to the Marketplace
- name: Publish Plugin
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/[email protected].2
uses: actions/[email protected].3

# Setup Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3.11.9
uses: actions/setup-java@v3.12.0
with:
distribution: zulu
java-version: 17
cache: gradle

# Setup Gradle
- name: Setup Gradle
uses: gradle/[email protected]

# Run IDEA prepared for UI testing
- name: Run IDE
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.

## [Unreleased]
## [1.0.7] - 2023-07-27

### Security

- Upgraded gradle version from 8.1.1 to 8.2.1

## [1.0.6] - 2023-07-22

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Whether you're a seasoned pro or just starting out, makes it easy to speed up th

## Installation

To install plugin open `Preferences > Plugins > Marketplace`, and search for Redwood.
For plugin installation, navigate to `Preferences`, then `Plugins`, and finally `Marketplace`. In the search bar, enter `Redwood`.

7 changes: 2 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pluginName = IntelliJ Redwood Plugin
pluginRepositoryUrl = https://github.com/KartanHQ/intellij-redwood

# SemVer format -> https://semver.org
pluginVersion = 1.0.6
pluginVersion = 1.0.7

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 222
Expand All @@ -23,7 +23,7 @@ platformPlugins = JavaScript
javaVersion = 17

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.1.1
gradleVersion = 8.2.1

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
Expand All @@ -36,6 +36,3 @@ org.gradle.caching = true

# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment
systemProp.org.gradle.unsafe.kotlin.assignment = true

# Temporary workaround for Kotlin Compiler OutOfMemoryError -> https://jb.gg/intellij-platform-kotlin-oom
kotlin.incremental.useClasspathSnapshot = false
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
annotations = "24.0.1"

# plugins
dokka = "1.8.20"
kotlin = "1.9.0"
changelog = "2.1.2"
gradleIntelliJPlugin = "1.15.0"
Expand All @@ -15,7 +14,6 @@ annotations = { group = "org.jetbrains", name = "annotations", version.ref = "an

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = "intellij-redwood"
rootProject.name = "intellij-redwood"
Loading

0 comments on commit 03c3bae

Please sign in to comment.