mirror of
https://github.com/Mr-dayhappy/Minecraft-place-mod.git
synced 2026-10-23 18:13:06 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
956295eeda | ||
|
|
623a43b26d |
No files matched your search
@@ -12,10 +12,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up JDK 25
|
- name: Set up JDK 25
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '25'
|
java-version: '25'
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
run: ./gradlew build --stacktrace
|
run: ./gradlew build --stacktrace
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: mod-jar
|
name: mod-jar
|
||||||
path: build/libs/*.jar
|
path: build/libs/*.jar
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up JDK 25
|
- name: Set up JDK 25
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '25'
|
java-version: '25'
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build -Pmod_version=${{ steps.ver.outputs.version }} --stacktrace
|
run: ./gradlew build -Pmod_version=${{ steps.ver.outputs.version }} --stacktrace
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.ver.outputs.tag }}
|
tag_name: ${{ steps.ver.outputs.tag }}
|
||||||
@@ -54,3 +54,27 @@ jobs:
|
|||||||
files: build/libs/*.jar
|
files: build/libs/*.jar
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Read Modrinth metadata
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
echo "project_id=$(jq -r .project_id modrinth.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "loaders=$(jq -r '.loaders | join(\",\")' modrinth.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "game_versions=$(jq -r '.game_versions | join(\",\")' modrinth.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "version_type=$(jq -r .version_type modrinth.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Publish to Modrinth
|
||||||
|
# 仅在正式 tag 时发布(跳过含 test 的 tag)
|
||||||
|
if: ${{ !contains(steps.ver.outputs.tag, 'test') }}
|
||||||
|
uses: Kir-Antipov/mc-publish@v3.3
|
||||||
|
with:
|
||||||
|
modrinth-id: ${{ steps.meta.outputs.project_id }}
|
||||||
|
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
files: build/libs/minecraft-place-mod-${{ steps.ver.outputs.version }}.jar
|
||||||
|
name: ${{ steps.ver.outputs.tag }}
|
||||||
|
version: ${{ steps.ver.outputs.version }}
|
||||||
|
version-type: ${{ steps.meta.outputs.version_type }}
|
||||||
|
loaders: ${{ steps.meta.outputs.loaders }}
|
||||||
|
game-versions: ${{ steps.meta.outputs.game_versions }}
|
||||||
|
changelog: 详见 GitHub Release。
|
||||||
|
modrinth-featured: false
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"project_id": "better-place-command",
|
||||||
|
"version_type": "release",
|
||||||
|
"loaders": [
|
||||||
|
"fabric"
|
||||||
|
],
|
||||||
|
"game_versions": [
|
||||||
|
"26.1.2"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in new issue
Block a user