Files
fabric-carpet/.github/workflows/rules-to-wiki.yml
T
altrisiandgnembon ba1071a8d1 Javadocs, cleanup, extension's client rules, built-in BundledModules generators, etc (#544)
* Add javadocs to many methods

* Added built-in ways to generate BundledModules and documented them

* Add Eclipse launch files to .gitignore and fix 11 warnings

* Remove many unused imports

* Remove some dead and unused code around app loading

* Allow extensions to have client-side rules in their SettingsManager

Also change tabs to spaces when those changed

* Remove unnecessary classloader param in BundledModule

* Change max tickwarp duration to Integer.MAX_VALUE

* Move RulePrinter into the source so it can be managed by the IDE

* Properly reset hopperCounters when changing worlds

Also change tabs to spaces again and minor tweaks to javadocs

* Run mergedocs even if Full.md was modified

* Update src/main/java/carpet/commands/TickCommand.java

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2020-11-16 09:30:59 -04:00

65 lines
2.1 KiB
YAML

name: Update wiki
on:
push:
branches:
- master
paths:
- "src/main/java/carpet/CarpetSettings.java"
jobs:
Rules:
runs-on: ubuntu-latest
steps:
- name: Checkout Carpet sources
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Replace fabric.mod.json
run: |
cd src/main/resources
rm fabric.mod.json
echo '
{
"schemaVersion": 1,
"id": "carpet",
"version": "1.4.11",
"entrypoints": {
"preLaunch": [ "carpet.utils.RulePrinter" ]
}
}' > 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";
File=settings-toProccess.txt
if grep -q "Deprecated Gradle features" "$File"; then # Happens after update to Gradle 6
to2="Deprecated Gradle features";
else
to2="BUILD SUCCESSFUL"
fi
a="$(cat settings-toProccess.txt)"; a="$(echo "${a#*"$from1"}")"; echo "$from1${a%%"$to2"*}" > wiki/Current-Available-Settings.md
- name: Commit updated wiki page
continue-on-error: true
run: |
cd wiki
git config --global user.name '${{ github.event.pusher.name }}' # Looks better than "github-actions-bot"
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "Update wiki for '${{ github.event.head_commit.message }}'"
git push