# Builds, tests the project with Gradle and uploads to Modrinth name: CI Tests & Publish on: push: branches: [ 'master' ] paths-ignore: - 'docs/**' - 'workflows/**' - 'README.md' permissions: contents: read checks: write jobs: build: runs-on: ubuntu-latest steps: - name: 'Checkout for CI ๐Ÿ›Ž๏ธ' uses: actions/checkout@v6 - name: 'Set up JDK 21 ๐Ÿ“ฆ' uses: actions/setup-java@v5 with: java-version: '21' distribution: 'temurin' - name: 'Build with Gradle ๐Ÿ—๏ธ' uses: gradle/gradle-build-action@v3 with: arguments: build test publish env: SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - name: 'Publish Test Report ๐Ÿ“Š' uses: mikepenz/action-junit-report@v6 if: success() || failure() # Continue on failure with: report_paths: '**/build/test-results/test/TEST-*.xml' - name: 'Fetch Version Name ๐Ÿ“' run: | echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')" id: fetch-version - name: Get Version run: | echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV - name: 'Publish to William278.net ๐Ÿš€' uses: WiIIiam278/bones-publish-action@v1 with: api-key: ${{ secrets.BONES_API_KEY }} project: 'huskhomes' channel: 'alpha' version: ${{ env.version_name }} changelog: ${{ github.event.head_commit.message }} distro-names: | paper fabric-1.21.1 fabric-1.21.5 fabric-1.21.8 fabric-1.21.11 distro-groups: | paper fabric fabric fabric fabric distro-descriptions: | Paper Fabric 1.21.1 Fabric 1.21.5 Fabric 1.21.8 Fabric 1.21.11 files: | target/HuskHomes-Paper-${{ env.version_name }}.jar target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.1.jar target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.5.jar target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.8.jar target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.11.jar - name: 'Spigot: Publish to Modrinth & Hangar ๐Ÿšฐ' uses: WiIIiam278/mc-publish@hangar with: modrinth-id: J6U9o3JG modrinth-featured: false modrinth-token: ${{ secrets.MODRINTH_TOKEN }} modrinth-dependencies: | dynmap | suggests | * bluemap | suggests | * pl3xmap | suggests | * plan | suggests | * hangar-id: William278/HuskHomes hangar-token: ${{ secrets.HANGAR_API_KEY }} hangar-version-type: Alpha files-primary: target/HuskHomes-Paper-${{ env.version_name }}.jar name: HuskHomes (Spigot) v${{ env.version_name }} version: ${{ env.version_name }} version-type: alpha changelog: ${{ github.event.head_commit.message }} loaders: | spigot paper folia game-versions: | 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.4 1.21.5 1.21.6 1.21.8 1.21.11 java: 17 - name: 'Fabric 1.21.1: Publish to Modrinth & CurseForge ๐Ÿงต' uses: WiIIiam278/mc-publish@hangar if: success() || failure() with: modrinth-id: J6U9o3JG modrinth-featured: false modrinth-token: ${{ secrets.MODRINTH_TOKEN }} curseforge-id: 849217 curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} dependencies: | fabric-api | requires | * dynmap | suggests | * bluemap | suggests | * pl3xmap | suggests | * luckperms | suggests | * plan | suggests | * impactor | suggests | * placeholder-api | suggests | * files-primary: target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.1.jar name: HuskHomes (Fabric) v${{ env.version_name }} version: ${{ env.version_name }} version-type: alpha changelog: ${{ github.event.head_commit.message }} loaders: | fabric game-versions: | 1.21.1 java: 21 - name: 'Fabric 1.21.5: Publish to Modrinth & CurseForge ๐Ÿงต' uses: WiIIiam278/mc-publish@hangar if: success() || failure() with: modrinth-id: J6U9o3JG modrinth-featured: false modrinth-token: ${{ secrets.MODRINTH_TOKEN }} curseforge-id: 849217 curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} dependencies: | fabric-api | requires | * dynmap | suggests | * bluemap | suggests | * pl3xmap | suggests | * luckperms | suggests | * plan | suggests | * impactor | suggests | * placeholder-api | suggests | * files-primary: target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.5.jar name: HuskHomes (Fabric) v${{ env.version_name }} version: ${{ env.version_name }} version-type: alpha changelog: ${{ github.event.head_commit.message }} loaders: | fabric game-versions: | 1.21.5 java: 21 - name: 'Fabric 1.21.8: Publish to Modrinth & CurseForge ๐Ÿงต' uses: WiIIiam278/mc-publish@hangar if: success() || failure() with: modrinth-id: J6U9o3JG modrinth-featured: false modrinth-token: ${{ secrets.MODRINTH_TOKEN }} curseforge-id: 849217 curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} dependencies: | fabric-api | requires | * dynmap | suggests | * bluemap | suggests | * pl3xmap | suggests | * luckperms | suggests | * plan | suggests | * impactor | suggests | * placeholder-api | suggests | * files-primary: target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.8.jar name: HuskHomes (Fabric) v${{ env.version_name }} version: ${{ env.version_name }} version-type: alpha changelog: ${{ github.event.head_commit.message }} loaders: | fabric game-versions: | 1.21.8 java: 21 - name: 'Fabric 1.21.11: Publish to Modrinth & CurseForge ๐Ÿงต' uses: WiIIiam278/mc-publish@hangar if: success() || failure() with: modrinth-id: J6U9o3JG modrinth-featured: false modrinth-token: ${{ secrets.MODRINTH_TOKEN }} curseforge-id: 849217 curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} dependencies: | fabric-api | requires | * dynmap | suggests | * bluemap | suggests | * pl3xmap | suggests | * luckperms | suggests | * plan | suggests | * impactor | suggests | * placeholder-api | suggests | * files-primary: target/HuskHomes-Fabric-${{ env.version_name }}+mc.1.21.11.jar name: HuskHomes (Fabric) v${{ env.version_name }} version: ${{ env.version_name }} version-type: alpha changelog: ${{ github.event.head_commit.message }} loaders: | fabric game-versions: | 1.21.11 java: 21