Add workflow for auto draft release #9
Workflow file for this run
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
name: Create release draft | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
pull_request: # This is for test and must be commented out before merging. | |
branches: [ develop ] | |
jobs: | |
release: | |
name: Create release draft | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create release draft | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
build: | |
name: Build and upload to assets | |
needs: [release] | |
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 }} | |
- name: Upload built package | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: build/distributions/*.zip | |
- name: Upload SPI jar | |
if: env.mainJob == 'true' | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: spi/build/libs/sudachi-*.jar |