Depend on exact game version #1
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
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Build | |
| run: ./gradlew build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Package | |
| path: build/libs/*.jar | |
| - name: Update description | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| run: ./gradlew modrinthSyncBody | |
| env: | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| - name: Create release | |
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: CHANGELOG.md | |
| files: build/libs/*.jar | |
| - name: Publish | |
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | |
| run: ./gradlew modrinth publishCurseForge | |
| env: | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} |