forked from UnitTestBot/UTBotJava
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.69 KB
/
publish-on-github-packages.yml
File metadata and controls
61 lines (54 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "[M] Publish on GitHub Packages"
on:
workflow_dispatch:
inputs:
commit-sha:
type: string
required: true
description: "commit SHA: e.g. cab4799c"
jobs:
publish_on_github_packages:
if: ${{ github.actor == 'korifey' || github.actor == 'denis-fokin' || github.actor == 'victoriafomina' ||
github.actor == 'bissquit' }}
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
java-package: jdk+fx
cache: gradle
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8
- name: Check out ${{ github.event.inputs.commit-sha }} commit
run: |
git fetch
git checkout ${{ github.event.inputs.commit-sha }}
- name: "UTBot Java: build and run tests"
run: |
export KOTLIN_HOME="/usr"
gradle clean build --no-daemon
- name: Upload utbot-framework logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: utbot_framework_logs
path: utbot-framework/logs/*
- name: Upload utbot-framework tests report artifacts if tests have failed
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: utbot_framework_tests_report
path: utbot-framework/build/reports/tests/test/*
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8
arguments: publish
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}