-
-
Notifications
You must be signed in to change notification settings - Fork 32
38 lines (32 loc) · 1.08 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}"