-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ec03b2
commit a1dba69
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
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.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.21' | ||
- 'es:7.17.8' | ||
- 'es:7.14.2' | ||
- 'es:7.10.2' | ||
- '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.13.4' }} | ||
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 }} | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload built packages | ||
with: | ||
name: artifact-${{ env.ENGINE_KIND }}-${{ env.ENGINE_VERSION }} | ||
path: | | ||
build/distributions/*.zip | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload SPI jar | ||
if: env.mainJob == 'true' | ||
with: | ||
name: artifact-spi | ||
path: | | ||
spi/build/libs/sudachi-*.jar | ||
release: | ||
name: draft release | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
name: Download all artifacts | ||
with: | ||
path: assets/ | ||
pattern: artifact-* | ||
merge-multiple: true | ||
- name: Create draft release with assets | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: | | ||
assets/* | ||