diff --git a/.github/workflows/publish-modrinth.yml b/.github/workflows/publish-modrinth.yml new file mode 100644 index 0000000..559ecf4 --- /dev/null +++ b/.github/workflows/publish-modrinth.yml @@ -0,0 +1,40 @@ +name: Publish to Modrinth + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + publish: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Build with Gradle + run: ./gradlew build + + - name: Publish to Modrinth + uses: cloudnode-pro/modrinth-publish@v2 + with: + token: ${{ secrets.MODRINTH_TOKEN }} + project: ${{ vars.MODRINTH_PROJECT_ID }} + version: ${{ github.event.release.tag_name }} + changelog: ${{ github.event.release.body }} + loaders: |- + velocity + bungeecord + game-versions: ">=1.8" + files: build/libs/*.jar \ No newline at end of file