diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..5e145a52 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: release-artifacts + +on: + release: + types: + - published + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build and publish mod to CurseForge & Modrinth + run: ./gradlew forge:publishToModSites fabric:publishToModSites + env: + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + - name: Upload assets to GitHub + uses: AButler/upload-release-assets@v2.0 + with: + files: 'bin/*' + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index f1518b24..1605d251 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -37,6 +37,6 @@ "minecraft": ">=1.16.2" }, "breaks": { - "dashloader": "*" + "dashloader": "<5.0.0-beta.1" } } diff --git a/scripts/propagate.sh b/scripts/propagate.sh new file mode 100755 index 00000000..f0fce218 --- /dev/null +++ b/scripts/propagate.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -e + +WORK_DIR=`mktemp -d` + +# deletes the temp directory +function cleanup { + cd $HOME + rm -rf "$WORK_DIR" +} + +trap cleanup EXIT + +# clone ModernFix repo + +echo "downloading temporary modernfix..." +cd $WORK_DIR +git clone https://github.com/embeddedt/ModernFix mfix &>/dev/null +cd mfix + +# gather version list +readarray -t all_versions < <(git ls-remote --heads origin | awk '{print $2}' | sed 's:.*/::' | sort -V) +echo "found versions: ${all_versions[@]}" + +# checkout base version +git checkout -b propagations/${all_versions[0]} origin/${all_versions[0]} &>/dev/null + +our_version=${all_versions[0]} +restore_version=$our_version + +for version in "${all_versions[@]}"; do + if ! { echo "$version"; echo "$our_version"; } | sort --version-sort --check &>/dev/null; then + echo -n "merging $our_version into ${version}... " + git checkout -b propagations/$version origin/$version &>/dev/null + if git merge -m "Merge $our_version into $version" propagations/$our_version >/dev/null; then + echo "done" + git push -u origin propagations/$version:$version &>/dev/null + else + echo "failed, this merge must be done manually" + exit 1 + fi + our_version=$version + fi +done diff --git a/release.sh b/scripts/release.sh similarity index 100% rename from release.sh rename to scripts/release.sh