@@ -3,58 +3,36 @@ name: "[M] Publish on GitHub Packages"
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- commit-sha :
6
+ commit_sha :
7
7
type : string
8
8
required : true
9
9
description : " commit SHA: e.g. cab4799c"
10
+
11
+ env :
12
+ # Environment variable setting gradle options.
13
+ 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"
10
14
11
15
jobs :
16
+ build-and-run-tests :
17
+ if : ${{ github.actor == 'korifey' || github.actor == 'denis-fokin' || github.actor == 'victoriafomina' || github.actor == 'bissquit' }}
18
+ uses : ./.github/workflows/build-and-run-tests-from-branch.yml
19
+ with :
20
+ commit_sha : ${{ github.event.inputs.commit_sha }}
21
+
12
22
publish_on_github_packages :
13
- if : ${{ github.actor == 'korifey' || github.actor == 'denis-fokin' || github.actor == 'victoriafomina' ||
14
- github.actor == 'bissquit' }}
23
+ needs : build-and-run-tests
15
24
runs-on : ubuntu-20.04
16
- permissions :
17
- packages : write
18
- contents : read
19
25
steps :
26
+ - name : Print environment variables
27
+ run : printenv
28
+
20
29
- uses : actions/checkout@v3
21
- - uses : actions/setup-java@v3
22
30
with :
23
- java-version : ' 8'
24
- distribution : ' zulu'
25
- java-package : jdk+fx
26
- cache : gradle
27
- - uses : gradle/gradle-build-action@v2
28
- with :
29
- gradle-version : 6.8
30
-
31
- - name : Check out ${{ github.event.inputs.commit-sha }} commit
32
- run : |
33
- git fetch
34
- git checkout ${{ github.event.inputs.commit-sha }}
35
-
36
- - name : " UTBot Java: build and run tests"
37
- run : |
38
- export KOTLIN_HOME="/usr"
39
- gradle clean build --no-daemon
40
-
41
- - name : Upload utbot-framework logs
42
- if : ${{ failure() }}
43
- uses : actions/upload-artifact@v2
44
- with :
45
- name : utbot_framework_logs
46
- path : utbot-framework/logs/*
47
-
48
- - name : Upload utbot-framework tests report artifacts if tests have failed
49
- if : ${{ failure() }}
50
- uses : actions/upload-artifact@v2
51
- with :
52
- name : utbot_framework_tests_report
53
- path : utbot-framework/build/reports/tests/test/*
54
-
31
+ ref : ${{ github.event.inputs.commit_sha }}
32
+
55
33
- uses : gradle/gradle-build-action@v2
56
34
with :
57
- gradle-version : 6.8
35
+ gradle-version : 7.4.2
58
36
arguments : publish
59
37
env :
60
38
GITHUB_ACTOR : ${{ github.actor }}
0 commit comments