为loc、here、whereis添加主世界/下界坐标转换 #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Mod | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- fabric/** | |
paths: | |
- src/** | |
- build.gradle | |
- gradle.properties | |
- settings.gradle | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [ 21 ] | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout | |
uses: actions/[email protected] | |
- name: validate gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: setup java ${{ matrix.java }} | |
uses: actions/[email protected] | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
- name: make gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Read Properties | |
id: 'properties' | |
uses: christian-draeger/[email protected] | |
with: | |
path: gradle.properties | |
properties: 'minecraft_version' | |
- name: Set build number | |
run: sed -i "s/undefined/$GITHUB_RUN_NUMBER/g" gradle.properties | |
- name: build | |
run: ./gradlew build | |
- name: Find correct JAR | |
id: find-jar | |
run: | | |
output="$(find build/libs/ ! -name "*-dev.jar" ! -name "*-sources.jar" -type f -printf "%f\n")" | |
echo "jarname=$output" >> $GITHUB_OUTPUT | |
echo "jarname=$output" | |
- name: Get name | |
id: get-name | |
run: | | |
output="$(find build/libs/ ! -name "*-dev.jar" ! -name "*-sources.jar" -type f -printf "%f\n")" | |
output_without_extension="${output%.jar}" | |
echo "name=$output_without_extension" >> $GITHUB_OUTPUT | |
echo "name=$output_without_extension" | |
- name: Get Version | |
id: version | |
run: | | |
MESSAGE=$(ls build/libs/* | grep dev.jar -v | grep sources.jar -v | awk -F 'gugle-carpet-addition-|.jar' '{print $2}') | |
echo "version=$MESSAGE" >> $GITHUB_OUTPUT | |
echo "version=$MESSAGE" | |
- name: capture build artifacts | |
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} | |
uses: actions/[email protected] | |
with: | |
name: ${{ steps.get-name.outputs.name }} | |
path: build/libs/${{ steps.find-jar.outputs.jarname }} | |
- name: publish mc mod | |
uses: Kir-Antipov/[email protected] | |
continue-on-error: true | |
with: | |
name: GugleCarpetAddition ${{ steps.version.outputs.version }} | |
version: ${{ steps.version.outputs.version }} | |
game-versions: ${{ steps.properties.outputs.minecraft_version }} | |
version-type: release | |
java: 21 | |
loaders: | | |
fabric | |
quilt | |
dependencies: [email protected](required){modrinth:TQTTVgYE}{curseforge:349239} | |
fail-mode: skip | |
modrinth-id: UHjbX5mk | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
modrinth-featured: true | |
curseforge-id: 662867 | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
files: build/libs/${{ steps.find-jar.outputs.jarname }} |