-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.88 KB
/
main.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
# https://help.github.com/en/actions/language-and-framework-guides/building-and-testing-java-with-gradle
# https://help.github.com/en/actions/language-and-framework-guides/publishing-java-packages-with-gradle
name: Publish
on:
push:
branches:
- main
jobs:
build:
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
# https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
# setup
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
# Cache
- name: Cache Gradle wrapper
uses: actions/cache@v1
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/*') }}
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
# Build
- name: Build
run: ./gradlew build app:installShadowDist app:nativeImage --continue
- uses: actions/upload-artifact@v1
if: runner.os == 'Linux'
with:
name: aidea-jar
path: app/build/install/app-shadow/lib/aidea-all.jar
# Publish GraalVM
- uses: actions/upload-artifact@v1
if: runner.os == 'Linux'
with:
name: aidea-linux
path: app/build/graal/aidea
- uses: actions/upload-artifact@v1
if: runner.os == 'macOS'
with:
name: aidea-macos
path: app/build/graal/aidea