Skip to content

Carpet-Fixes v1.17.0 for 1.20.4 #55

Carpet-Fixes v1.17.0 for 1.20.4

Carpet-Fixes v1.17.0 for 1.20.4 #55

Workflow file for this run

name: Publish Artifacts
on:
release:
types:
- published
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 17
cache: 'gradle'
- name: Grant execute permission to gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- uses: Kir-Antipov/[email protected]
with:
modrinth-featured: true
version-type: release
version-resolver: releases
dependencies: |
carpet | depends
loaders: |
fabric
quilt
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
Update-Rules-Wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout Carpet sources
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Replace fabric.mod.json
run: |
cd src/main/resources
rm fabric.mod.json
echo '
{
"schemaVersion": 1,
"id": "carpet-fixes",
"version": "${version}",
"entrypoints": {
"server": ["carpetfixes.helpers.CarpetRulePrinter"],
"preLaunch": ["carpetfixes.helpers.CarpetRulePrinter"]
}
}' > fabric.mod.json
cd ../../../
- name: Run solution
run: |
chmod +x gradlew
./gradlew runServer > settings-toProccess.txt
- name: Checkout wiki
uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: wiki
- name: Proccess Gradle log into a pretty wiki page
run: |
from1="# carpet-fixes";
File=settings-toProccess.txt
if grep -q "Deprecated Loom APIs were used in this build" "$File"; then
to2="Deprecated Loom APIs were used in this build";
else
to2="BUILD SUCCESSFUL"
fi
a="$(cat settings-toProccess.txt)"; a="$(echo "${a#*"$from1"}")"; echo "# Carpet Fixes${a%%"$to2"*}" > wiki/Available-Settings.md
- name: Commit updated wiki page
continue-on-error: true
run: |
cd wiki
git config --global user.name 'github-actions-bot' # Releases don't have valid commiter info :(
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "Update wiki for '${{ github.event.release.name }}'" || exit 0
git push