Skip to content

Commit

Permalink
Merge pull request #26 from Jmorjsm/no-max-version
Browse files Browse the repository at this point in the history
Stop needing to bump max version
  • Loading branch information
Jmorjsm committed Dec 10, 2023
2 parents db480a2 + 1fa9cc6 commit 58853d1
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 324 deletions.
126 changes: 6 additions & 120 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}

steps:

# Check out current repository
Expand All @@ -41,125 +39,13 @@ jobs:
- name: Gradle Wrapper Validation
uses: gradle/[email protected]

# Setup Java 11 environment for the next steps
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
distribution: adopt
java-version: 17
cache: gradle

# Set environment variables
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
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

# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/[email protected]
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/[email protected]

# Collect Qodana Result
- name: Collect Qodana Result
uses: actions/upload-artifact@v2
with:
name: qodana-result
path: ${{ github.workspace }}/qodana

# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content
echo "::set-output name=filename::$FILENAME"
# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/[email protected]
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*

# 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.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:

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

# Remove old release drafts by using the curl request for the available releases with draft flag
- name: Remove Old Release Drafts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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:
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
)"
- name: Build plugin
run: ./gradlew buildPlugin
60 changes: 0 additions & 60 deletions .github/workflows/run-ui-tests.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .run/Run Plugin Tests.run.xml

This file was deleted.

26 changes: 0 additions & 26 deletions .run/Run Plugin Verification.run.xml

This file was deleted.

26 changes: 0 additions & 26 deletions .run/Run Qodana.run.xml

This file was deleted.

15 changes: 1 addition & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ plugins {
id("org.jetbrains.intellij") version "1.10.2"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.1"
// Gradle Qodana Plugin
id("org.jetbrains.qodana") version "0.1.13"
}

group = properties("pluginGroup")
Expand All @@ -34,8 +32,7 @@ intellij {
version.set(properties("platformVersion"))
type.set(properties("platformType"))

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
updateSinceUntilBuild.set(false)
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
Expand All @@ -44,23 +41,13 @@ changelog {
groups.set(emptyList())
}

// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
qodana {
cachePath.set(projectDir.resolve(".qodana").canonicalPath)
reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath)
saveReport.set(true)
showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false)
}

tasks {
wrapper {
gradleVersion = properties("gradleVersion")
}

patchPluginXml {
version.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))

// Get the latest available change notes from the changelog file
changeNotes.set(provider {
Expand Down
11 changes: 1 addition & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@
pluginGroup = com.github.jmorjsm.rosepineintellij
pluginName = rose-pine-intellij
# SemVer format -> https://semver.org
pluginVersion = 0.0.8

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 213
pluginUntilBuild = 232.*
pluginVersion = 0.1.0

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IC
platformVersion = 2022.2

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins =

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

Expand Down
6 changes: 0 additions & 6 deletions qodana.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Includes all three of the rose pine themes (rose-pine, rose-pine-dawn, rose-pine-moon).
]]>
</description>

<idea-version since-build="222"/>
<depends>com.intellij.modules.platform</depends>

<extensions defaultExtensionNs="com.intellij">
Expand Down

This file was deleted.

Loading

0 comments on commit 58853d1

Please sign in to comment.