feat: Update gradle wrapper #114
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_publish | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| paths: | |
| - fabric/** | |
| - neoforge/** | |
| - common/** | |
| - build.gradle | |
| - gradle.properties | |
| jobs: | |
| build_publish: | |
| strategy: | |
| matrix: | |
| # Use these Java versions | |
| java: [ | |
| 21, # Current Java LTS & minimum supported by Minecraft | |
| ] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| if: "!contains(github.event.head_commit.message, 'ci skip')" | |
| steps: | |
| - name: checkout repository | |
| uses: actions/checkout@v4 | |
| - name: setup jdk ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'microsoft' | |
| cache: gradle | |
| - name: make gradle wrapper executable | |
| if: "${{ runner.os != 'Windows' }}" | |
| run: chmod +x ./gradlew | |
| - name: build | |
| run: ./gradlew build | |
| - name: upload to modrinth | |
| if: "github.ref == 'refs/heads/multi/1.21.5' && !contains(github.event.head_commit.message, 'upload skip')" | |
| run: ./gradlew modrinth | |
| env: | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_UPLOAD_TOKEN }} | |
| GITHUB_RUN_NUMBER: ${{ github.run_number }} | |
| GITHUB_EVENT_RAW_PATH: ${{ github.event_path }} | |
| - name: upload to curseforge | |
| if: "github.ref == 'refs/heads/multi/1.21.5' && !contains(github.event.head_commit.message, 'upload skip')" | |
| run: ./gradlew publishCurseForge | |
| env: | |
| CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_UPLOAD_TOKEN }} | |
| GITHUB_RUN_NUMBER: ${{ github.run_number }} | |
| GITHUB_EVENT_RAW_PATH: ${{ github.event_path }} |