Portal highlighting save/load to disk setting #12
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: Fabric 1.20.2 Build And Release | |
on: | |
push: | |
branches: | |
- "fabric-1.20.2" | |
env: | |
WORLDMAP_VERSION: "1.36.0" | |
MINIMAP_VERSION: "23.8.4" | |
MINECRAFT_VERSION: "1.20.2" | |
MINECRAFT_VERSION_SHORT: "1.20.2" | |
MOD_LOADER: "Fabric" | |
FABRIC_API_VERSION: "0.90.0+1.20.2" | |
FABRIC_API_MODRINTH_VERSION_ID: "Hk8zAzIB" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Gradle Wrapper Verification | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Elevate wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Build mod | |
run: ./gradlew build | |
- name: Rename built mod | |
run: mv build/libs/xaeroplus-${{ env.MINECRAFT_VERSION }}.jar XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }} | |
path: XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | |
- name: Download Xaero WorldMap | |
run: wget https://chocolateminecraft.com/mods2/worldmap/XaerosWorldMap_${{ env.WORLDMAP_VERSION }}_${{ env.MOD_LOADER }}_${{ env.MINECRAFT_VERSION_SHORT }}.jar --no-check-certificate | |
- name: Download Xaero Minimap | |
run: wget https://chocolateminecraft.com/mods2/minimap/Xaeros_Minimap_${{ env.MINIMAP_VERSION }}_${{ env.MOD_LOADER }}_${{ env.MINECRAFT_VERSION_SHORT }}.jar --no-check-certificate | |
- name: Download Fabric API | |
run: wget https://cdn.modrinth.com/data/P7dR8mSH/versions/${{ env.FABRIC_API_MODRINTH_VERSION_ID }}/fabric-api-${{ env.FABRIC_API_VERSION }}.jar --no-check-certificate | |
- name: Create modpack zip | |
run: > | |
zip -j | |
XaeroPlus-modpack-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}.zip | |
XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | |
XaerosWorldMap_${{ env.WORLDMAP_VERSION }}_${{ env.MOD_LOADER }}_${{ env.MINECRAFT_VERSION_SHORT }}.jar | |
Xaeros_Minimap_${{ env.MINIMAP_VERSION }}_${{ env.MOD_LOADER }}_${{ env.MINECRAFT_VERSION_SHORT }}.jar | |
fabric-api-${{ env.FABRIC_API_VERSION }}.jar | |
- name: Upload modpack artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: XaeroPlus-modpack-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }} | |
path: XaeroPlus-modpack-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}.zip | |
# todo: for future auto-update check feature | |
# - name: Create version identifier file | |
# run: echo ${{ github.run_number }} > version.txt | |
- name: Get Previous Release Number | |
env: | |
THIS_RUN_NUMBER: ${{ github.run_number }} | |
run: | | |
echo "PREV_RUN_NUMBER=$(($THIS_RUN_NUMBER - 1))" >> "$GITHUB_ENV" | |
- name: Generate changelog | |
id: changelog | |
uses: metcalfc/changelog-generator@v4.1.0 | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
base-ref: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ env.PREV_RUN_NUMBER }} | |
- name: Release | |
uses: Kir-Antipov/mc-publish@v3.3 | |
with: | |
changelog: ${{steps.changelog.outputs.changelog}} | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
curseforge-id: 866084 | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
modrinth-id: EnPUzSTg | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
github-files: | | |
XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | |
XaeroPlus-modpack-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}.zip | |
github-tag: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }} | |
github-commitish: fabric-1.20.2 | |
files: | | |
XaeroPlus-${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }}.jar | |
name: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }}-WM${{ env.WORLDMAP_VERSION }}-MM${{ env.MINIMAP_VERSION }} | |
version: ${{ github.run_number }} | |
loaders: | | |
${{ env.MOD_LOADER }} | |
quilt | |
game-versions: | | |
${{ env.MINECRAFT_VERSION }} | |
dependencies: | | |
xaerominimap@${{ env.MINIMAP_VERSION }}(required){modrinth:1bokaNcj}{curseforge:263420} | |
xaeroworldmap@${{ env.WORLDMAP_VERSION }}(required){modrinth:NcUtCpym}{curseforge:317780} | |
fabric-api@${{ env.FABRIC_API_VERSION }}(required){modrinth:P7dR8mSH}{curseforge:306612} |