Skip to content

Commit ac26ba8

Browse files
authored
Publish workflow (#115)
* publish workflow test Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * verify only RD Signed-off-by: shalom <[email protected]> * disable idea and pycharm modules Signed-off-by: shalom <[email protected]> * disable idea and pycharm modules Signed-off-by: shalom <[email protected]> * disable idea and pycharm modules Signed-off-by: shalom <[email protected]> * disable idea and pycharm modules Signed-off-by: shalom <[email protected]> * test release again Signed-off-by: shalom <[email protected]> * test release again Signed-off-by: shalom <[email protected]> * publish workflow test Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * disable idea and pycharm modules Signed-off-by: shalom <[email protected]> * disable idea and pycharm modules Signed-off-by: shalom <[email protected]> * test release again Signed-off-by: shalom <[email protected]> * gradle.xml Signed-off-by: shalom <[email protected]> * gradle ci Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]> * publish workflow Signed-off-by: shalom <[email protected]>
1 parent 9e58af8 commit ac26ba8

File tree

14 files changed

+88
-150
lines changed

14 files changed

+88
-150
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#
1313
## JBIJPPTPL (Jetbrains intellij platform plugin template)
1414

15+
1516
name: Build
1617
on:
1718
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)

.github/workflows/gradle-ci.yml

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,60 @@ name: CI Build and Upload plugin all branches
99

1010
on:
1111
push:
12-
branches: [ '**' ]
13-
pull_request:
14-
branches: [ main ]
12+
branches: [ '**','!main' ]
1513

1614
jobs:
1715
build:
1816

1917
runs-on: ubuntu-latest
2018

2119
steps:
22-
- uses: actions/checkout@v3
23-
- name: Set up JDK 11
24-
uses: actions/setup-java@v3
25-
with:
26-
java-version: '11'
27-
distribution: 'temurin'
28-
- name: Setup dotnet
29-
uses: actions/setup-dotnet@v2
30-
with:
31-
dotnet-version: |
32-
6.0.102
33-
- name: Validate Gradle wrapper
34-
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
35-
- name: Build with Gradle
36-
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
37-
with:
38-
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
39-
gradle-home-cache-excludes: |
40-
caches/**/riderRD-*/**
41-
caches/**/ideaIC-*/**
42-
caches/**/pycharmPC-*/**
43-
arguments: buildPlugin
44-
- name: Upload Artifact GitHub Action
45-
uses: actions/upload-artifact@v3
46-
with:
47-
name: digma-intellij-plugin
48-
path: build/distributions/digma-intellij-1.0.14.zip
20+
- uses: actions/checkout@v3
21+
22+
- name: Set up JDK 11
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: '11'
26+
distribution: 'corretto'
27+
28+
- name: Setup dotnet
29+
uses: actions/setup-dotnet@v2
30+
with:
31+
dotnet-version: |
32+
6.0.102
33+
- name: Validate Gradle wrapper
34+
uses: gradle/[email protected]
35+
36+
- name: Build with Gradle
37+
uses: gradle/[email protected]
38+
with:
39+
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
40+
# gradle-home-cache-excludes: |
41+
# caches/**/riderRD-*/**
42+
# caches/**/ideaIC-*/**
43+
# caches/**/pycharmPC-*/**
44+
arguments: buildPlugin --no-daemon
45+
46+
- name: Prepare Plugin Artifact
47+
id: artifact
48+
shell: bash
49+
run: |
50+
cd ${{ github.workspace }}/build/distributions
51+
FILENAME=`ls *.zip`
52+
unzip "$FILENAME" -d content
53+
echo "::set-output name=filename::${FILENAME:0:-4}"
54+
55+
- name: Upload Artifact
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: ${{ steps.artifact.outputs.filename }}
59+
path: ./build/distributions/content/*/*
60+
61+
# Collect Tests Result of failed tests
62+
##todo: add other modules test reports
63+
- name: Collect Tests Result
64+
if: ${{ failure() }}
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: tests-result
68+
path: ${{ github.workspace }}/ide-common/build/reports/tests

.github/workflows/publish.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.idea/gradle.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import common.properties
2+
import org.jetbrains.changelog.date
23
import org.jetbrains.changelog.markdownToHTML
34

45
fun properties(key: String) = properties(key,project)
@@ -21,8 +22,10 @@ dependencies{
2122
implementation(project(":model"))
2223
implementation(project(":analytics-provider"))
2324
implementation(project(":ide-common"))
24-
implementation(project(":idea"))
25-
implementation(project(":pycharm"))
25+
//todo: github builds fail for no space on device, we need a solution for that. maybe don't depend on the IDE but only on the
26+
// python module?
27+
// implementation(project(":idea"))
28+
// implementation(project(":pycharm"))
2629
implementation(project(":rider"))
2730
}
2831

@@ -42,9 +45,14 @@ intellij {
4245
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
4346
changelog {
4447
version.set(properties("pluginVersion"))
48+
path.set("${project.projectDir}/CHANGELOG.md")
49+
//groups.set(listOf("Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"))
4550
groups.set(emptyList())
51+
header.set(provider { "[${version.get()}] - ${date()}" })
52+
keepUnreleasedSection.set(false)
4653
}
4754

55+
4856
// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
4957
qodana {
5058
cachePath.set(projectDir.resolve(".qodana").canonicalPath)
@@ -64,12 +72,9 @@ project.afterEvaluate{
6472
//it can be written with task fqn like buildPlugin.dependsOn(":rider:buildPlugin")
6573
//but this syntax is not favorite by the gradle developers becasue it will cause eager initialization of the task.
6674
val buildPlugin = tasks.named("buildPlugin").get()
67-
val classes = tasks.named("classes").get()
68-
project(":idea").afterEvaluate{ buildPlugin.dependsOn(tasks.getByName("buildPlugin")) }
69-
project(":pycharm").afterEvaluate{ buildPlugin.dependsOn(tasks.getByName("buildPlugin")) }
70-
project(":rider").afterEvaluate{
71-
buildPlugin.dependsOn(tasks.getByName("buildPlugin"))
72-
}
75+
// project(":idea").afterEvaluate{ buildPlugin.dependsOn(tasks.getByName("buildPlugin")) }
76+
// project(":pycharm").afterEvaluate { buildPlugin.dependsOn(tasks.getByName("buildPlugin")) }
77+
project(":rider").afterEvaluate { buildPlugin.dependsOn(tasks.getByName("buildPlugin")) }
7378
}
7479

7580

@@ -122,20 +127,6 @@ tasks {
122127
systemProperty("jb.consents.confirmation.enabled", "false")
123128
}
124129

125-
signPlugin {
126-
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
127-
privateKey.set(System.getenv("PRIVATE_KEY"))
128-
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
129-
}
130-
131-
publishPlugin {
132-
dependsOn("patchChangelog")
133-
token.set(System.getenv("PUBLISH_TOKEN"))
134-
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
135-
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
136-
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
137-
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
138-
}
139130

140131
buildSearchableOptions {
141132
enabled = false
@@ -145,7 +136,7 @@ tasks {
145136
enabled = false
146137
}
147138

148-
var deleteLog = create("deleteLogs", Delete::class.java) {
139+
val deleteLog = create("deleteLogs", Delete::class.java) {
149140
project.layout.buildDirectory.dir("idea-sandbox/system/log").get().asFile.walk().forEach {
150141
if (it.name.endsWith(".log")) {
151142
delete(it)
@@ -166,10 +157,8 @@ tasks {
166157

167158

168159
listProductsReleases {
169-
//todo: decide which releases to support
170-
// types.set(listOf("RD","IC","PC"))
171-
//todo: change to support only rider and add support for other IDEs later
172-
types.set(listOf("RD","IC","PC","IU"))
160+
// types.set(listOf("RD","IC","PC","IU"))
161+
types.set(listOf("RD"))
173162
sinceVersion.set("2022.1")
174163
untilVersion.set("2022.1.2")
175164
// sinceBuild.set("221.5787.35")
@@ -196,8 +185,14 @@ tasks {
196185

197186

198187
publishPlugin {
199-
if (System.getenv("DIGMA_JB_INTELLIJ_PUBLISH_TOKEN") != null) {
200-
token.set(System.getenv("DIGMA_JB_INTELLIJ_PUBLISH_TOKEN"))
188+
if (System.getenv("PUBLISH_TOKEN") != null) {
189+
token.set(System.getenv("PUBLISH_TOKEN"))
201190
}
191+
192+
// pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
193+
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
194+
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
195+
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()))
202196
}
197+
203198
}

buildSrc/src/main/kotlin/plugin-library.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ tasks{
3333
publishPlugin {
3434
enabled = false
3535
}
36+
37+
listProductsReleases{
38+
enabled = false
39+
}
40+
41+
patchPluginXml{
42+
enabled = false
43+
}
3644
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
pluginGroup = org.digma.plugins
77
pluginName = digma-intellij
88
# SemVer format -> https://semver.org
9-
pluginVersion=1.0.14
9+
pluginVersion=1.0.15-alpha.1
1010

1111
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1212
# for insight into build numbers and IntelliJ Platform versions.

rider/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ tasks {
6363
dependsOn(named("setBuildTool"))
6464
dependsOn(named("rdgen"))
6565
doLast {
66-
var arguments: MutableList<String> = (setBuildTool.extra.get("args") as Array<String>).toMutableList()
66+
val arguments: MutableList<String> = (setBuildTool.extra.get("args") as Array<String>).toMutableList()
6767
arguments.add("/t:Restore;Rebuild")
6868
exec {
6969
executable = setBuildTool.extra.get("executable").toString()
@@ -93,7 +93,7 @@ tasks {
9393

9494
dllFiles.forEach {
9595
val file = file(it)
96-
println("found dotnet object: " + file)
96+
logger.lifecycle("found dotnet object: $file")
9797
from(file)
9898
}
9999
into(sandboxDotnetDir)

sample-projects/simple-idea-java-project/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

sample-projects/simple-idea-java-project/src/com/company/Main.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)