-
-
Notifications
You must be signed in to change notification settings - Fork 42
100 lines (95 loc) · 2.59 KB
/
release.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
name: Create release draft
on:
push:
tags:
- "v*.*.*"
# pull_request: # This is for test and must be commented out before merging.
# branches: [ develop ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
es-version:
- 'es:8.15.2'
- 'es:8.14.3'
- 'es:8.13.4'
- 'es:8.12.2'
- 'es:8.11.4'
- 'es:8.10.4'
- 'es:8.9.2'
- 'es:8.8.2'
- 'es:8.7.1'
- 'es:8.6.2'
- 'es:8.5.3'
- 'es:8.4.3'
- 'es:8.3.3'
- 'es:8.2.3'
- 'es:7.17.24'
- 'es:7.17.8'
- 'es:7.14.2'
- 'es:7.10.2'
- 'os:2.18.0'
- 'os:2.17.1'
- 'os:2.16.0'
- 'os:2.15.0'
- 'os:2.14.0'
- 'os:2.13.0'
- 'os:2.12.0'
- 'os:2.11.1'
- 'os:2.10.0'
- 'os:2.9.0'
- 'os:2.8.0'
- 'os:2.7.0'
- 'os:2.6.0'
env:
mainJob: ${{ matrix.es-version == 'es:8.15.2' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Extract version and set to github env
run: ./gradlew -PengineVersion=${{ matrix.es-version }} printVersionForGithubActions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: ./gradlew -PengineVersion=${{ matrix.es-version }} --info clean build koverXmlReport
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload built package
uses: actions/upload-artifact@v4
with:
name: artifact-${{ env.ENGINE_KIND }}-${{ env.ENGINE_VERSION }}
path: build/distributions/*.zip
- name: Upload SPI jar
if: env.mainJob == 'true'
uses: actions/upload-artifact@v4
with:
name: artifact-spi
path: spi/build/libs/sudachi-*.jar
release-draft:
name: Create release draft
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: artifact-*
path: dist/
merge-multiple: true
- name: List files to upload
run: ls -R dist/
- name: Create release draft with assets
uses: softprops/action-gh-release@v2
with:
draft: true
files: dist/*