ci: use java 23 #36
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 23 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
validate-wrappers: true | |
build-scan-publish: true | |
build-scan-terms-of-use-url: https://gradle.com/terms-of-service | |
build-scan-terms-of-use-agree: "yes" | |
cache-overwrite-existing: true | |
- name: Grant Execution Permission | |
run: chmod +x ./gradlew | |
- name: Build Project | |
run: ./gradlew build --stacktrace --info | |
- name: Extract Files | |
id: files | |
run: | | |
files=($(find build/libs -maxdepth 1 -type f -name "discord-bridge-*.jar")) | |
echo "file1=$(basename "${files[0]}")" >> "$GITHUB_OUTPUT" | |
echo "file2=$(basename "${files[1]}")" >> "$GITHUB_OUTPUT" | |
echo "file3=$(basename "${files[2]}")" >> "$GITHUB_OUTPUT" | |
- name: Upload ${{ steps.files.outputs.file1 }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.files.outputs.file1 }} | |
path: build/libs/${{ steps.files.outputs.file1 }} | |
- name: Upload ${{ steps.files.outputs.file2 }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.files.outputs.file2 }} | |
path: build/libs/${{ steps.files.outputs.file2 }} | |
- name: Upload ${{ steps.files.outputs.file3 }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.files.outputs.file3 }} | |
path: build/libs/${{ steps.files.outputs.file3 }} |