Skip to content

Commit 2de00b6

Browse files
Update publish-on-github-packages.yml
1 parent 1dc05f9 commit 2de00b6

File tree

1 file changed

+18
-40
lines changed

1 file changed

+18
-40
lines changed

.github/workflows/publish-on-github-packages.yml

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,36 @@ name: "[M] Publish on GitHub Packages"
33
on:
44
workflow_dispatch:
55
inputs:
6-
commit-sha:
6+
commit_sha:
77
type: string
88
required: true
99
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"
1014

1115
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+
1222
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
1524
runs-on: ubuntu-20.04
16-
permissions:
17-
packages: write
18-
contents: read
1925
steps:
26+
- name: Print environment variables
27+
run: printenv
28+
2029
- uses: actions/checkout@v3
21-
- uses: actions/setup-java@v3
2230
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+
5533
- uses: gradle/gradle-build-action@v2
5634
with:
57-
gradle-version: 6.8
35+
gradle-version: 7.4.2
5836
arguments: publish
5937
env:
6038
GITHUB_ACTOR: ${{ github.actor }}

0 commit comments

Comments
 (0)