Skip to content

Commit 7d85011

Browse files
Update publish-plugin-and-cli-from-branch.yml
1 parent 2de00b6 commit 7d85011

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/publish-plugin-and-cli-from-branch.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: "[M] Plugin and CLI: publish as archives"
22

33
on:
4+
workflow_call:
5+
inputs:
6+
version-postfix:
7+
type: string
8+
description: "It adds postfix (alpha or beta) to version (optional)."
9+
required: false
10+
default: no-postfix
11+
412
workflow_dispatch:
513
inputs:
614
version-postfix:
@@ -13,16 +21,25 @@ on:
1321
- alpha
1422
- beta
1523

24+
env:
25+
# Environment variable setting gradle options.
26+
GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -javaagent:/tmp/jmx-exporter.jar=12345:/tmp/jmx-exporter.yml -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false"
27+
1628
jobs:
1729
publish_plugin_and_cli:
1830
runs-on: ubuntu-20.04
1931
container: unittestbot/java-env:java11-zulu-jdk-fx-gradle7.4.2-kotlinc1.7.0
2032

2133
steps:
34+
- name: Print environment variables
35+
run: printenv
36+
2237
- uses: actions/checkout@v3
2338

2439
- name: Set environment variables
2540
run: |
41+
# "You can make an environment variable available to any subsequent steps in a workflow job by
42+
# defining or updating the environment variable and writing this to the GITHUB_ENV environment file."
2643
echo "VERSION="$(date +%Y).$(date +%-m)"" >> $GITHUB_ENV
2744
echo "POSTFIX=${{ github.event.inputs.version-postfix }}" >> $GITHUB_ENV
2845
@@ -37,7 +54,6 @@ jobs:
3754
cd utbot-intellij/build/distributions
3855
unzip utbot-intellij-${{ env.VERSION }}.zip
3956
rm utbot-intellij-${{ env.VERSION }}.zip
40-
4157
- name: Archive UTBot IntelliJ IDEA plugin
4258
uses: actions/upload-artifact@v3
4359
with:
@@ -46,9 +62,8 @@ jobs:
4662

4763
- name: Build UTBot CLI
4864
run: |
49-
export KOTLIN_HOME="/usr"
5065
cd utbot-cli
51-
gradle clean build --no-daemon -PsemVer=${{ env.VERSION }}
66+
gradle build --no-daemon -PsemVer=${{ env.VERSION }}
5267
5368
- name: Archive UTBot CLI
5469
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)