Skip to content

Publish to Hangar & Modrinth with Gradle #1

Publish to Hangar & Modrinth with Gradle

Publish to Hangar & Modrinth with Gradle #1

Workflow file for this run

name: 'Publish to Hangar & Modrinth with Gradle'
on:
release:
branches: [master]
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish to Hangar with Gradle
uses: gradle/gradle-build-action@v3
env:
HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }}
CHANGELOG: ${{ github.event.release.body }}
with:
arguments: build publishPluginPublicationToHangar --stacktrace -Pchangelog="${{ github.event.release.body }}"
- name: Publish to Modrinth with Gradle
uses: gradle/gradle-build-action@v3
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: ${{ github.event.release.body }}
with:
arguments: build modrinth --stacktrace -Pchangelog="${{ github.event.release.body }}"