Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
./gradlew build --scan
ls -la build/libs/

- name: 'Save Artifact'
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
id: save-artifact
with:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Publish Datapack'

env:
ARTIFACT_NAME: 'msmp_console'

on:
release:
types: [published]

jobs:
build:
name: 'Build'
uses: ./.github/workflows/build.yml

publish:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4

- name: 'Download Artifact'
uses: actions/download-artifact@v4
with:
path: './artifacts'
name: '${{ env.ARTIFACT_NAME }}'

- name: 'Publish to Modrinth'
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
files: |
./artifacts/*.jar

name: ${{ github.event.repository.name }}
version: ${{ github.event.release.tag_name }}
version-type: ${{ github.event.release.prerelease && 'beta' || 'release' }}
changelog: ${{ github.event.release.body }}
10 changes: 10 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,15 @@
"fabricloader": ">=${loader_version}",
"fabric-api": "*",
"minecraft": "${minecraft_version}"
},
"custom": {
"mc-publish": {
"modrinth": {
"project_id": "kVuh4pG0",
"loaders": [
"fabric"
]
}
}
}
}
Loading