-
Notifications
You must be signed in to change notification settings - Fork 200
64 lines (53 loc) · 1.78 KB
/
build.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
name: build
on:
push:
branches:
- master
pull_request:
types: [ opened, labeled, unlabeled, synchronize ]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
jvm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version:
- 8
- 11
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run build with caching enabled
run: ./gradlew clean build -s
- name: Run examples
run: |
export VERSION_NAME=$(cat gradle.properties | grep -w "VERSION_NAME" | cut -d'=' -f2)
rm -rf ~/.m2/repository/com/github/ben-manes/gradle-versions-plugin/$VERSION_NAME
./gradlew publishToMavenLocal -x test -s
cat ~/.m2/repository/com/github/ben-manes/gradle-versions-plugin/$VERSION_NAME/gradle-versions-plugin-$VERSION_NAME.pom
cd examples/groovy/ && ../../gradlew dU && cd -
cd examples/kotlin/ && ../../gradlew dU && cd -
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: gradle-versions-plugin-${{ matrix.java-version }}-${{ github.workflow }}-${{ github.run_id }}
path: |
build/libs
build/outputs
build/publications
build/distributions
build/reports
build/test-results
if-no-files-found: warn