2024-11-14 11:53:08 +01:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
2024-11-14 12:38:31 +01:00
|
|
|
Gradle-Build:
|
2024-11-14 11:53:08 +01:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
java-version: '23'
|
|
|
|
check-latest: true
|
|
|
|
distribution: 'zulu'
|
|
|
|
|
2024-11-14 12:45:43 +01:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
with:
|
|
|
|
add-job-summary: always
|
|
|
|
cache-cleanup: on-success
|
|
|
|
|
2024-11-14 11:53:08 +01:00
|
|
|
- name: Cache Gradle dependencies
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: chmod +x gradlew; ./gradlew assemble
|
|
|
|
|
2024-11-14 12:38:31 +01:00
|
|
|
- name: Move artifacts
|
|
|
|
run: mkdir artifacts; mv lib/build/libs/*.jar artifacts; mv wrapper/javacord/build/libs/*.jar artifacts;
|
|
|
|
|
2024-11-14 11:53:08 +01:00
|
|
|
- name: Upload artifact
|
2024-11-14 12:23:41 +01:00
|
|
|
uses: christopherhx/gitea-upload-artifact@v4
|
2024-11-14 11:53:08 +01:00
|
|
|
with:
|
|
|
|
name: artifacts
|
2024-11-14 12:38:31 +01:00
|
|
|
path: artifacts
|