Skip to content

Commit 1abe823

Browse files
committed
plugin build publishing script
1 parent 04c8157 commit 1abe823

2 files changed

Lines changed: 23 additions & 42 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: Publish to JetBrains Marketplace
1+
name: Plugin deployment
22

33
on:
4-
push:
4+
pull_request:
55

66
concurrency:
77
group: publish-plugin-${{ github.ref_name }}
88
cancel-in-progress: true
99

10-
1110
jobs:
12-
test:
13-
name: Run Tests for ${{ matrix.environmentName }}
11+
deploy:
12+
name: Deploy the plugin for ${{ matrix.environmentName }}
1413
runs-on: arc-runners-large
1514
timeout-minutes: 60
1615
strategy:
@@ -30,44 +29,23 @@ jobs:
3029
distribution: 'corretto'
3130
cache: 'gradle'
3231

32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v3
34+
35+
- name: Build
36+
run: .gradlew buildPlugin -PenvironmentName=${{ matrix.environmentName }}
37+
3338
- name: Run Tests
34-
env:
35-
GRADLE_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options=-Xmx1g"
36-
run: |
37-
echo "environmentName=${{ matrix.environmentName }}"
38-
./gradlew test \
39-
--parallel -Dorg.gradle.workers.max=2 -Dorg.gradle.test.worker.max=2 \
40-
--no-daemon -PenvironmentName=${{ matrix.environmentName }}
39+
run: gradlew test -PenvironmentName=${{ matrix.environmentName }}
4140

42-
verify:
43-
name: Verify Plugin for ${{ matrix.environmentName }}
44-
runs-on: arc-runners-large
45-
timeout-minutes: 60
46-
strategy:
47-
matrix:
48-
environmentName:
49-
- 252
50-
- 253
51-
fail-fast: false
52-
steps:
53-
- uses: actions/checkout@v4
54-
with:
55-
fetch-depth: 1
41+
- name: Verify
42+
run: gradlew verifyPlugin -PenvironmentName=${{ matrix.environmentName }}
5643

57-
- uses: actions/setup-java@v4
44+
- name: Upload
45+
uses: actions/upload-artifact@v4
5846
with:
59-
java-version-file: '.java-version'
60-
distribution: 'corretto'
61-
cache: 'gradle'
62-
63-
- name: Verify Plugin
64-
env:
65-
GRADLE_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options=-Xmx1g"
66-
run: |
67-
echo "environmentName=${{ matrix.environmentName }}"
68-
./gradlew verifyPlugin \
69-
--parallel -Dorg.gradle.workers.max=2 -Dorg.gradle.test.worker.max=2 \
70-
--no-daemon -PenvironmentName=${{ matrix.environmentName }}
47+
name: HyperskillAcademy-version-${{ matrix.environmentName }}
48+
path: build/distributions
7149

7250
# publish:
7351
# name: Publish Plugin
@@ -86,7 +64,6 @@ jobs:
8664
# distribution: 'corretto'
8765
#
8866
# - name: Publish Plugin
89-
# run: |
90-
# ./gradlew publishPlugin --no-daemon
67+
# run: gradlew publishPlugin
9168
# env:
9269
# JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }}

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ enableBuildSearchableOptions=false
2828
# Note, remove `-` before build number (`b` letter) to make it work
2929
#jbrVersion=17.0.11b1207.24
3030

31-
org.gradle.jvmargs=-Xmx2g
31+
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
32+
kotlin.daemon.jvm.options=-Xmx1g
3233

3334
# Since kotlin 1.4, stdlib dependency is added by default by kotlin gradle plugin.
3435
# But we don't need it because all necessary kotlin libraries are already bundled into IDE.
@@ -46,3 +47,6 @@ publishingVersion=
4647
# Build speed optimizations
4748
kotlin.incremental=true
4849
org.gradle.parallel=true
50+
org.gradle.daemon=false
51+
org.gradle.workers.max=2
52+
org.gradle.test.worker.max=2

0 commit comments

Comments
 (0)