Skip to content

Publish

Publish #15

Workflow file for this run

name: Publish
on:
workflow_run:
types:
- completed
workflows:
- Test
- Build
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}
- name: Set up SDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: chmod +x ./gradlew
- name: Publish on Modrinth
run: ./gradlew modrinth --no-daemon
env:
MODRINTH_SECRET: ${{ secrets.MODRINTH_SECRET }}