From 6ac856345b2194b3e0704b0a5d5e1b9eea4ae65a Mon Sep 17 00:00:00 2001 From: Lucas Bandermann Date: Mon, 29 Jan 2024 18:52:23 +0100 Subject: [PATCH] Final touch ups, github action script --- .github/workflows/publish.yml | 104 ++++++++++++++++++++++ CHANGELOG.md | 1 + README.md | 2 +- fabric/src/main/resources/fabric.mod.json | 2 +- 4 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ef7357f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,104 @@ +name: Build and Release (1.20) + +on: + push: + branches: + - "1.20/main" + +jobs: + build: + name: "Build and Release" + runs-on: ubuntu-20.04 + + permissions: + contents: write + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: 17 + distribution: 'temurin' + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - run: chmod +x gradlew + + - name: Build Version + uses: gradle/gradle-build-action@v2 + with: + arguments: build --stacktrace --no-daemon + + - name: Setting mod version + run: | + cat $GITHUB_WORKSPACE/gradle.properties | grep ^archives_base_name= >> $GITHUB_ENV + cat $GITHUB_WORKSPACE/gradle.properties | grep ^minecraft_version= >> $GITHUB_ENV + cat $GITHUB_WORKSPACE/gradle.properties | grep ^mod_version= >> $GITHUB_ENV + + - name: Publish Forge version + uses: Kir-Antipov/mc-publish@v3.3 + with: + name: PantheonSent ${{ env.mod_version }} for Forge/NeoForge ${{ env.minecraft_version }} + version: ${{ env.mod_version }}+${{ env.minecraft_version }}-forge + modrinth-id: SIKMQqt0 + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + curseforge-id: 968457 + curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} + changelog-file: CHANGELOG.md + loaders: | + forge + neoforge + game-versions: | + ${{ env.minecraft_version }} + files: | + forge/build/libs/!(*-@(dev-shadow|sources|javadoc)).jar + dependencies: | + palladium(required){modrinth:lt2zd42r}{curseforge:963363} + curios(optional){modrinth:vvuO3ImH}{curseforge:309927} + + - name: Publish Fabric version + uses: Kir-Antipov/mc-publish@v3.3 + with: + name: PantheonSent ${{ env.mod_version }} for Fabric/Quilt ${{ env.minecraft_version }} + version: ${{ env.mod_version }}+${{ env.minecraft_version }}-fabric + modrinth-id: SIKMQqt0 + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + curseforge-id: 968457 + curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} + changelog-file: CHANGELOG.md + loaders: | + fabric + quilt + game-versions: | + ${{ env.minecraft_version }} + files: | + fabric/build/libs/!(*-@(dev-shadow|sources|javadoc)).jar + dependencies: | + palladium(required){modrinth:lt2zd42r}{curseforge:963363} + trinkets(optional){modrinth:5aaWibi9}{curseforge:341284} + + - name: Send SquirrelControl Update + uses: tyrrrz/action-http-request@master + with: + url: https://squirrelcontrol.threetag.net/api/mod-update-post + method: POST + headers: | + Content-Type: application/json + body: | + { + "mod": "pantheonsent", + "version": "${{ env.mod_version }}", + "token": "${{ secrets.SQUIRRELCONTROL_API_TOKEN }}" + } + retry-count: 3 + retry-delay: 500 + + - name: Publish to Maven + uses: gradle/gradle-build-action@v2 + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + with: + arguments: publish --stacktrace --no-daemon \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bf5cd5b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Release! \ No newline at end of file diff --git a/README.md b/README.md index cad3621..5dbc822 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ This power grants you strength, agility, and some other neat buffs for fighting **Eye of Horus** - This accessory can be worn (also supports Curios/Trinkets) and in case you are low on health, Horus himself will grant you regeneration. # Credits -**[Sydney](https://twitter.com/Sydokiddo)** - Khonshu Model +**[Sydney](https://twitter.com/Sydokiddo)** - Khonshu Model **[Biz](https://twitter.com/BizZzlol)** - Moon Knight/Mr Knight Skin **[Neon](https://twitter.com/ThePoopPal)** - Music Disc Song **[Connor Dawn](https://twitter.com/TheConnorDawn)** - Banner Render \ 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 58c651f..19c2fc2 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -8,7 +8,7 @@ "Lucraft" ], "contact": { - "homepage": "https://www.curseforge.com/minecraft/mc-mods/pantheonsent", + "homepage": "https://modrinth.com/project/pantheonsent", "sources": "https://github.com/ThreeTAG/PantheonSent" }, "license": "All rights reserved",