bump version to 2.5.0-SNAPSHOT for further development. #1519
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
| name: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Set Variables & Build | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const isPR = context.eventName === 'pull_request'; | |
| const branch = isPR ? context.payload.pull_request.head.ref.replace(/\//g, '-') : 'master'; | |
| const sha = (isPR ? context.payload.pull_request.head.sha : context.sha).substring(0, 7); | |
| const artifactName = `EternalCombat ${branch}+${sha}`; | |
| core.exportVariable('FULL_ARTIFACT_NAME', artifactName); | |
| - name: Build with Gradle | |
| run: ./gradlew shadowJar | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ env.FULL_ARTIFACT_NAME }} | |
| path: eternalcombat-plugin/build/libs/*.jar |