Mainline Build And Release #172
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: Mainline Build And Release | |
on: | |
workflow_dispatch: | |
env: | |
WORLDMAP_VERSION: "1.39.2" | |
MINIMAP_VERSION: "24.7.1" | |
MINECRAFT_VERSION: "1.12.2" | |
MINECRAFT_VERSION_SHORT: "1.12" | |
MOD_LOADER: "Forge" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Gradle Wrapper Verification | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
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@v4 | |
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 | |
# 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/[email protected] | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
base-ref: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ env.PREV_RUN_NUMBER }} | |
- name: Release | |
uses: Kir-Antipov/[email protected] | |
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 | |
github-tag: ${{ env.MOD_LOADER }}-${{ env.MINECRAFT_VERSION }}-${{ github.run_number }} | |
github-commitish: mainline | |
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 }} | |
game-versions: | | |
${{ env.MINECRAFT_VERSION }} | |
dependencies: | | |
xaerominimap@${{ env.MINIMAP_VERSION }}(required){modrinth:1bokaNcj}{curseforge:263420} | |
xaeroworldmap@${{ env.WORLDMAP_VERSION }}(required){modrinth:NcUtCpym}{curseforge:317780} | |
mixinbooter(required){modrinth:G1ckZuWK}{curseforge:419286} |