[#454] Fix region file cache on paper (#455) #465
Workflow file for this run
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: Build | |
| on: | |
| - workflow_dispatch | |
| - push | |
| - pull_request | |
| jobs: | |
| build: | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set BUILD_VERSION | |
| run: echo "BUILD_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))-b$GITHUB_RUN_NUMBER" >> $GITHUB_ENV | |
| - name: Restore Maven cache | |
| id: cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ secrets.CACHE_VERSION }}-${{ hashFiles('./.github/workflows/buildtools.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven-${{ secrets.CACHE_VERSION }}- | |
| - name: Set up JDK 17/21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: | | |
| 8 | |
| 17 | |
| 21 | |
| - name: Run BuildTools | |
| run: | | |
| bash ./.github/workflows/buildtools.sh | |
| - name: Build | |
| run: | | |
| mvn clean package --batch-mode -Drevision=$BUILD_VERSION | |
| mv orebfuscator-plugin/target/orebfuscator-*.jar ./ | |
| - name: Save Maven cache | |
| if: always() && steps.cache-restore.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ steps.cache-restore.outputs.cache-primary-key }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: orebfuscator-plugin | |
| path: ./orebfuscator-*.jar |