-
Notifications
You must be signed in to change notification settings - Fork 7
103 lines (100 loc) · 3.22 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
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
92
93
94
95
96
97
98
99
100
101
102
103
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
os: [ macos-latest, windows-latest ]
name: package
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- if: ${{ matrix.os == 'macos-latest' }}
name: Install bundler and download blosc
run: |
brew install dylibbundler
curl -J -O -k -L 'https://github.com/glencoesoftware/c-blosc-macos-x86_64/releases/download/20220919/libblosc.dylib'
- if: ${{ matrix.os == 'windows-latest' }}
name: Download blosc
run: |
c:\msys64\usr\bin\wget.exe 'https://github.com/glencoesoftware/c-blosc-windows-x86_64/releases/download/20220919/blosc.dll'
- if: ${{ matrix.os == 'windows-latest' }}
name: Run jpackage with Gradle (installer)
uses: gradle/gradle-build-action@v2
with:
arguments: jpackage
- if: ${{ matrix.os == 'macos-latest' }}
name: Run jpackage with Gradle (application image only)
uses: gradle/gradle-build-action@v2
with:
arguments: jpackageImageZip
- if: ${{ matrix.os == 'macos-latest' }}
name: Generate dependency report
uses: gradle/gradle-build-action@v2
with:
arguments: downloadLicenses
- if: ${{ matrix.os == 'macos-latest' }}
name: Upload Mac pkg
uses: actions/upload-artifact@v2
with:
name: macos-package
path: ./build/distributions/*.zip
if-no-files-found: error
retention-days: 3
- if: ${{ matrix.os == 'windows-latest' }}
name: Upload Windows MSI
uses: actions/upload-artifact@v2
with:
name: windows-package
path: ./build/jpackage/*.msi
if-no-files-found: error
retention-days: 3
- if: ${{ matrix.os == 'macos-latest' }}
name: Upload Mac pkg
uses: actions/upload-artifact@v2
with:
name: dependency-report
path: ./build/reports/license/dependency-license*
if-no-files-found: error
retention-days: 3
upload:
name: Create release
needs: build
runs-on: ubuntu-latest
if: startswith(github.ref, 'refs/tags/')
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: List artifacts
run: ls -R
- name: Create release draft
uses: softprops/action-gh-release@v1
with:
files: |
windows-package/*.msi
macos-package/*.zip
dependency-report/*
draft: true
fail_on_unmatched_files: true