-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (55 loc) · 1.88 KB
/
build-on-pr.yml
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
62
63
64
65
name: Build JAICF Plugin on PR
on:
pull_request:
types: [ opened ]
branches: [ 212/master ]
jobs:
gradleValidation:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/[email protected]
- name: Gradle Wrapper Validation
uses: gradle/[email protected]
build:
name: Build
needs: gradleValidation
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/[email protected]
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 11
cache: gradle
- name: Export Properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)"
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
echo "::set-output name=version::$VERSION"
echo "::set-output name=name::$NAME"
echo "::set-output name=ideVersions::$IDE_VERSIONS"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
- name: Build Plugin
run: ./gradlew buildPlugin
- name: Upload artifacts
uses: actions/[email protected]
with:
name: "${{ steps.properties.outputs.name }} - ${{ steps.properties.outputs.version }}"
path: ./build/distributions/*