Merge pull request #73 from sakura-ryoko/multiversion #195
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
# build Java CI with Gradle | |
on: | |
push: | |
# ignore *.md *.yml file changes | |
# run on 'multiversion' branch | |
branches: [ multiversion ] | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Caches Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
./.gradle/loom-cache | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew buildAndGather --stacktrace --no-daemon | |
- name: Upload build artifact | |
uses: actions/[email protected] | |
with: | |
name: Artifacts from ${{ github.sha }} | |
path: build/libs/ |