-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (39 loc) · 1.5 KB
/
publish.yml
File metadata and controls
43 lines (39 loc) · 1.5 KB
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
name: Publish to CurseForge & Modrinth
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-24.04
steps:
- name: Checkout Master Repository
uses: actions/checkout@v4
with:
ref: master
- name: Get Mod Info
id: mod_info
run: |
VERSION=$(grep "mod_version" gradle.properties | cut -d'=' -f2)
MC_VERSION=$(grep "minecraft_version" gradle.properties | cut -d'=' -f2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "mc_version=$MC_VERSION" >> $GITHUB_OUTPUT
- name: Download Artifacts from Build branch
uses: actions/checkout@v4
with:
ref: build
path: build-artifacts
- name: Publish to CurseForge + Modrinth
uses: tristankechlo/publish-mc-mod@v2.0.0
with:
mc-version: ${{ steps.mod_info.outputs.mc_version }}
mod-version: ${{ steps.mod_info.outputs.version }}
curseforge-id: ${{ secrets.CURSEFORGE_PROJECT_ID }}
modrinth-id: ${{ secrets.MODRINTH_PROJECT_ID }}
version-range: ${{ steps.mod_info.outputs.mc_version }}
version-type: "release"
loaders: "fabric"
fabric-glob: "build-artifacts/stackabletools-${{ steps.mod_info.outputs.version }}.jar"
changelog: "Official release of v${{ steps.mod_info.outputs.version }}"
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}
modrinth-token: ${{ secrets.MODRINTH_API_TOKEN }}