-
Notifications
You must be signed in to change notification settings - Fork 14
121 lines (118 loc) · 4.33 KB
/
gradle.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Gradle build and publish on tag
---
name: Build
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
build:
strategy:
matrix:
java: [8, 11]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
gradle_version: 6.8.3 # use ``current`` to install the current stable release
gradle_commands: build # default is build
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'gradle'
java-package: 'jdk+fx'
- uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ env.gradle_version }}
- name: Run commands
run: gradle ${{ env.gradle_commands }}
- name: Prepare PATH
if: startsWith(matrix.os, 'windows')
shell: bash
run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH
- name: Re-install innosetup
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
shell: cmd
run: |
choco uninstall innosetup
choco install innosetup --version=5.6.1
- name: Build insight exe
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
shell: cmd
run: |
gradle packageApplicationExe
- name: Build importer exe
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
shell: cmd
run: |
gradle packageImporterApplicationExe
- name: Build insight msi
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
shell: cmd
run: |
gradle packageApplicationMsi
- name: Build importer msi
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
shell: cmd
run: |
gradle packageImporterApplicationMsi
- name: Check MSI
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
run: |
msi=(`find build/packaged/installImporterDist/bundles -maxdepth 1 -name "*.msi"`)
if [ ${#msi[@]} == 0 ]; then
exit 1
fi
msi=(`find build/packaged/main/bundles -maxdepth 1 -name "*.msi"`)
if [ ${#msi[@]} == 0 ]; then
exit 1
fi
shell: bash
- name: Upload zip and jar
if: startsWith(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
uses: actions/upload-artifact@v4
with:
name: artifacts
path: build/distributions/OMERO*
if-no-files-found: error
- name: Upload jar
if: startsWith(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
uses: actions/upload-artifact@v3
with:
name: artifacts
path: build/libs/omero_*
if-no-files-found: error
- name: Upload insight artifacts
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
uses: actions/upload-artifact@v3
with:
name: artifacts
path: build/packaged/main/bundles/*
if-no-files-found: error
- name: Upload importer artifacts
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '8')
uses: actions/upload-artifact@v3
with:
name: artifacts
path: build/packaged/installImporterDist/bundles/*
release:
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts from build
uses: actions/download-artifact@v3
- name: List artifacts
run: ls -R
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true