-
Notifications
You must be signed in to change notification settings - Fork 22
91 lines (87 loc) · 2.4 KB
/
build.yml
File metadata and controls
91 lines (87 loc) · 2.4 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Build
on:
push:
branches:
- master
paths-ignore:
- '**/.idea/**'
- '**/README.md'
- '**/.gitignore'
pull_request:
branches:
- master
paths-ignore:
- '**/.idea/**'
- '**/README.md'
- '**/.gitignore'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
large-packages: false
- name: Checkout code
uses: actions/checkout@v6
- name: Setup JDK 21
uses: actions/setup-java@v5
with:
distribution: corretto
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Build and test plugin
run: ./gradlew check buildPlugin
- name: Collect test results
if: ${{ failure() }}
uses: actions/upload-artifact@v6
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests
- name: Prepare plugin artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
- name: Upload plugin artifact
uses: actions/upload-artifact@v6
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/**
verify:
name: Verify
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
large-packages: false
- name: Checkout code
uses: actions/checkout@v6
- name: Setup JDK 21
uses: actions/setup-java@v5
with:
distribution: corretto
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: true
- name: Verify plugin
run: ./gradlew verifyPlugin
- name: Collect Plugin Verifier results
if: ${{ always() }}
uses: actions/upload-artifact@v6
with:
name: plugin-verifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier