Skip to content

Commit eb01ed0

Browse files
Update icon, configure semantic versioning, add GitHub Actions
1 parent 8879b64 commit eb01ed0

8 files changed

Lines changed: 81 additions & 18 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
publish:
8+
name: Package, sign and publish the plugin
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
ref: ${{ github.head_ref }}
15+
16+
- uses: gradle/wrapper-validation-action@v1
17+
18+
- uses: actions/setup-java@v3
19+
with:
20+
distribution: 'adopt'
21+
java-version: '11'
22+
23+
- name: Publish plugin
24+
env:
25+
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
26+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
27+
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
28+
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
29+
run: ./gradlew publishPlugin
30+
31+
- name: Create tag
32+
run: ./gradlew createAndPushVersionTag

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.gradle
22
build/
3+
.env
34
!gradle/wrapper/gradle-wrapper.jar
45
!**/src/main/**/build/
56
!**/src/test/**/build/

build.gradle.kts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@ plugins {
22
id("java")
33
id("org.jetbrains.kotlin.jvm") version "1.8.0"
44
id("org.jetbrains.intellij") version "1.11.0"
5+
id("io.github.nefilim.gradle.semver-plugin") version "0.3.13"
6+
}
7+
8+
semver {
9+
initialVersion("0.0.0")
10+
tagPrefix("")
11+
when (System.getenv("INCREASE_VERSION")) {
12+
"MAJOR" -> versionModifier { nextMajor() }
13+
"MINOR" -> versionModifier { nextMinor() }
14+
"PATCH" -> versionModifier { nextPatch() }
15+
}
516
}
617

718
group = "pl.semidude"
8-
version = "1.0.1"
19+
version = semver.version
920

1021
repositories {
1122
mavenCentral()
@@ -35,7 +46,7 @@ tasks {
3546

3647
patchPluginXml {
3748
sinceBuild.set("213")
38-
untilBuild.set("223.*")
49+
untilBuild.set("213.*")
3950
}
4051

4152
signPlugin {
@@ -47,4 +58,12 @@ tasks {
4758
publishPlugin {
4859
token.set(System.getenv("PUBLISH_TOKEN"))
4960
}
61+
62+
createAndPushVersionTag {
63+
dependsOn(publishPlugin)
64+
}
65+
66+
register("releasePlugin") {
67+
dependsOn(createAndPushVersionTag)
68+
}
5069
}

release-major.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export INCREASE_VERSION=MAJOR
2+
export CERTIFICATE_CHAIN=`cat .env/certificate-chain`
3+
export PRIVATE_KEY=`cat .env/private-key`
4+
export PRIVATE_KEY_PASSWORD=`cat .env/private-key-password`
5+
export PUBLISH_TOKEN=`cat .env/publish-token`
6+
export DATAGRIP_DIR=`cat .env/datagrip-dir`
7+
./gradlew releasePlugin

release-minor.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export INCREASE_VERSION=MINOR
2+
export CERTIFICATE_CHAIN=`cat .env/certificate-chain`
3+
export PRIVATE_KEY=`cat .env/private-key`
4+
export PRIVATE_KEY_PASSWORD=`cat .env/private-key-password`
5+
export PUBLISH_TOKEN=`cat .env/publish-token`
6+
export DATAGRIP_DIR=`cat .env/datagrip-dir`
7+
./gradlew releasePlugin

release-patch.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export INCREASE_VERSION=PATCH
2+
export CERTIFICATE_CHAIN=`cat .env/certificate-chain`
3+
export PRIVATE_KEY=`cat .env/private-key`
4+
export PRIVATE_KEY_PASSWORD=`cat .env/private-key-password`
5+
export PUBLISH_TOKEN=`cat .env/publish-token`
6+
export DATAGRIP_DIR=`cat .env/datagrip-dir`
7+
./gradlew releasePlugin

src/main/resources/META-INF/plugin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
Simple HTML elements (text formatting, paragraphs, and lists) can be added inside of <![CDATA[ ]]> tag.
1515
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description -->
1616
<description><![CDATA[
17-
It is recommended to use this plugin in DataGrip, but it should also work in other IDEs with database support.
18-
<br /><br />
19-
What it does:
17+
What this plugin does:
2018
<ul>
2119
<li>Changes default presentation mode of the query results to <tt>Tree</tt></li>
2220
<li>If there is only one result, it is automatically expanded</li>
2321
<li>You can copy value of the leaf node without the containing JSON via Cmd+Option+C </li>
2422
</ul>
23+
<br />
24+
It is recommended to use this plugin in DataGrip, but it should also work in other IDEs with database support.
2525
]]>
2626
</description>
2727

Lines changed: 3 additions & 13 deletions
Loading

0 commit comments

Comments
 (0)