generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (54 loc) · 1.96 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: publish
on:
release:
types: [created]
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build mod
run: ./gradlew build
- name: modrinth_publish
run: ./gradlew modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
ALPHA: ${{ github.event.release.prerelease }}
CAHNGELOG: ${{ github.event.release.body }}
VERSION: ${{ github.event.release.tag_name }}
VERSION_NAME: ${{ github.event.release.name }}
- name: curseforge_publish
uses: itsmeow/[email protected]
with:
file_path: "./build/libs/BookingIt-${{ github.event.release.tag_name }}.jar"
game_endpoint: minecraft
relations: "fabric-api:requiredDependency,ARRP:includedLibrary"
game_versions: "Minecraft 1.19:1.19-Snapshot,Java 17,Fabric"
release_type: alpha
project_id: 629377
token: ${{ secrets.CURSEFORGE_TOKEN }}
changelog: ${{ github.event.release.body }}
display_name: ${{ github.event.release.name }}