Publish to Hangar & Modrinth with Gradle #1
Workflow file for this run
This file contains 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 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 }}" |