fix #208
This file contains hidden or 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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
| name: test-build | |
| on: | |
| push: | |
| paths: | |
| - 'src/**' | |
| - 'build.gradle' | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'build.gradle' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup Java 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Apply Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: $${{ runner.os }}-gradle | |
| - name: Checkout t88 | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: USS-Shenzhou/t88 | |
| path: t88 | |
| - name: Build t88 | |
| run: | | |
| cd t88 | |
| chmod +x gradlew | |
| ./gradlew publishToMavenLocal --stacktrace | |
| - name: Get Short Identifier | |
| uses: benjlevesque/short-sha@v1.2 | |
| id: short-sha | |
| - name: Read Mod Version | |
| id: modversion | |
| run: echo "VERSION=$(grep '^mod_version=' gradle.properties | cut -d= -f2)" >> "$GITHUB_OUTPUT" | |
| - name: Build MadParticle | |
| run: ./gradlew :build --stacktrace | |
| - name: GitHub Action Artifact | |
| uses: actions/upload-artifact@v4 | |
| if: success() | |
| with: | |
| name: madparticle-${{ steps.modversion.outputs.VERSION }}.dev-${{ steps.short-sha.outputs.sha }}.jar | |
| path: build/libs/madparticle-${{ steps.modversion.outputs.VERSION }}.jar |