Publish Release #4
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: Publish Release | |
| on: | |
| push: | |
| branches: | |
| - '*/prod' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Publish with gradle | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 25 | |
| distribution: temurin | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| ./.gradle/loom-cache | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Publish | |
| run: ./gradlew publish publishMods | |
| env: | |
| CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE}} | |
| MODRINTH_TOKEN: ${{secrets.MODRINTH}} | |
| GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| DISCORD_WEBHOOK: ${{secrets.DISCORD_WEBHOOK}} |