fix #7
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 will build a Java project with Gradle | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
| name: Build | |
| on : [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'adopt' | |
| - name: Set version env | |
| run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Set Email | |
| run: git config --global user.email "you@example.com" | |
| - name: Set Account | |
| run: git config --global user.name "Your Name" | |
| - name: Apply Patches | |
| run: ./gradlew applyPatches | |
| - name: Build Jar | |
| run: ./gradlew createMojmapBundlerJar | |
| - name: Upload Release | |
| uses: ncipollo/release-action@v1.12.0 | |
| with: | |
| allowUpdates: true | |
| makeLatest: true | |
| removeArtifacts: true | |
| tag: "1.21.10-release" | |
| artifacts: ./paper-server/build/libs/*.jar | |
| token: ${{ secrets.GITHUB_TOKEN }} |