diff --git a/.github/workflows/publish-with-quilt.yml b/.github/workflows/publish-with-quilt.yml new file mode 100644 index 000000000..8b8e1b01a --- /dev/null +++ b/.github/workflows/publish-with-quilt.yml @@ -0,0 +1,304 @@ +name: "Tmp file backup with quilt publish" + +env: + VERSION_TYPE: release + JAVA_VERSIONS: | + Java 17 + Java 18 + FABRIC_DEPENDENCIES: | + fabric-api | depends | * + architectury-api | depends | * + FORGE_DEPENDENCIES: | + architectury-api | depends | * + QUILT_DEPENDENCIES: | + qsl | depends | * + architectury-api | depends | * + RETRY_ATTEMPTS: 3 + RELAY_DELAY: 10000 + VERSION_RESOLVER: latest + +jobs: + build: + runs-on: ubuntu-latest + name: "Build" + timeout-minutes: 30 + + steps: + - name: "Checkout repository" + uses: actions/checkout@v3 + + - name: "Set up JDK" + uses: actions/setup-java@v3.3.0 + with: + java-version: 17 + distribution: temurin + cache: gradle + + - name: "Make gradle wrapper executable" + run: chmod +x ./gradlew + + - name: "Build with gradle" + run: ./gradlew clean build --no-daemon --refresh-dependencies --stacktrace + + - name: "Capture build artifacts" + uses: actions/upload-artifact@v3.1.0 + with: + name: "friends-and-foes" + path: | + fabric/build/libs/friendsandfoes-fabric-mc1.19.0-1.5.0.jar + forge/build/libs/friendsandfoes-forge-mc1.19.0-1.5.0.jar + quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar + LICENSE.txt + + publish-license-to-release: + needs: build + runs-on: ubuntu-latest + name: "Publish license to GitHub" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish license to GitHub" + uses: AButler/upload-release-assets@v3.0 + with: + files: 'LICENSE.txt' + repo-token: ${{ secrets.GITHUB_TOKEN }} + + publish-fabric-to-github: + needs: build + runs-on: ubuntu-latest + name: "Publish Fabric to GitHub" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Fabric to GitHub" + uses: AButler/upload-release-assets@v3.0 + with: + files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19.0-1.5.0.jar' + repo-token: ${{ secrets.GITHUB_TOKEN }} + + publish-fabric-to-curseforge: + needs: build + runs-on: ubuntu-latest + name: "Publish Fabric to CurseForge" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Fabric to CurseForge" + uses: Kir-Antipov/mc-publish@v2.1 + with: + curseforge-id: 551364 + curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} + + files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19.0-1.5.0.jar" + version-type: ${{ env.VERSION_TYPE }} + loaders: fabric + game-versions: 1.19.0 + name: "Friends&Foes mc1.19.0-1.5.0 (Fabric)" + dependencies: ${{ env.FABRIC_DEPENDENCIES }} + java: ${{ env.JAVA_VERSIONS }} + + retry-attempts: ${{ env.RETRY_ATTEMPTS }} + retry-delay: ${{ env.RETRY_DELAY }} + version-resolver: ${{ env.VERSION_RESOLVER }} + + publish-fabric-to-modrinth: + needs: build + runs-on: ubuntu-latest + name: "Publish Fabric to Modrinth" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Fabric to Modrinth" + uses: Kir-Antipov/mc-publish@v2.1 + with: + modrinth-id: POQ2i9zu + modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} + + files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19.0-1.5.0.jar" + version-type: ${{ env.VERSION_TYPE }} + loaders: fabric + game-versions: 1.19.0 + name: "Friends&Foes mc1.19.0-1.5.0 (Fabric)" + version: "fabric-mc1.19.0-1.5.0" + dependencies: ${{ env.FABRIC_DEPENDENCIES }} + java: ${{ env.JAVA_VERSIONS }} + retry-attempts: ${{ env.RETRY_ATTEMPTS }} + retry-delay: ${{ env.RETRY_DELAY }} + version-resolver: ${{ env.VERSION_RESOLVER }} + + publish-forge-to-github: + needs: build + runs-on: ubuntu-latest + name: "Publish Forge to GitHub" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Forge to GitHub" + uses: AButler/upload-release-assets@v3.0 + with: + files: 'forge/build/libs/friendsandfoes-forge-mc1.19.0-1.5.0.jar' + repo-token: ${{ secrets.GITHUB_TOKEN }} + + publish-forge-to-curseforge: + needs: build + runs-on: ubuntu-latest + name: "Publish Forge to CurseForge" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Forge to CurseForge" + uses: Kir-Antipov/mc-publish@v2.1 + with: + curseforge-id: 602059 + curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} + + files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19.0-1.5.0.jar" + version-type: ${{ env.VERSION_TYPE }} + loaders: forge + game-versions: 1.19.0 + name: "Friends&Foes mc1.19.0-1.5.0 (Forge)" + dependencies: ${{ env.FORGE_DEPENDENCIES }} + java: ${{ env.JAVA_VERSIONS }} + + retry-attempts: ${{ env.RETRY_ATTEMPTS }} + retry-delay: ${{ env.RETRY_DELAY }} + version-resolver: ${{ env.VERSION_RESOLVER }} + + publish-forge-to-modrinth: + needs: build + runs-on: ubuntu-latest + name: "Publish Forge to Modrinth" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Forge to Modrinth" + uses: Kir-Antipov/mc-publish@v2.1 + with: + modrinth-id: BOCJKD49 + modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} + + files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19.0-1.5.0.jar" + version-type: ${{ env.VERSION_TYPE }} + loaders: forge + game-versions: 1.19.0 + name: "Friends&Foes mc1.19.0-1.5.0 (Forge)" + version: "forge-mc1.19.0-1.5.0" + dependencies: ${{ env.FORGE_DEPENDENCIES }} + java: ${{ env.JAVA_VERSIONS }} + retry-attempts: ${{ env.RETRY_ATTEMPTS }} + retry-delay: ${{ env.RETRY_DELAY }} + version-resolver: ${{ env.VERSION_RESOLVER }} + + + publish-quilt-to-github: + needs: build + runs-on: ubuntu-latest + name: "Publish Quilt to GitHub" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Quilt to GitHub" + uses: AButler/upload-release-assets@v3.0 + with: + files: 'quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar' + repo-token: ${{ secrets.GITHUB_TOKEN }} + + publish-quilt-to-curseforge: + needs: build + runs-on: ubuntu-latest + name: "Publish Quilt to CurseForge" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Quilt to CurseForge" + uses: Kir-Antipov/mc-publish@v2.1 + with: + curseforge-id: 628248 + curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} + + files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar" + version-type: ${{ env.VERSION_TYPE }} + loaders: quilt + game-versions: 1.19.0 + name: "Friends&Foes mc1.19.0-1.5.0 (Quilt)" + dependencies: ${{ env.QUILT_DEPENDENCIES }} + java: ${{ env.JAVA_VERSIONS }} + + retry-attempts: ${{ env.RETRY_ATTEMPTS }} + retry-delay: ${{ env.RETRY_DELAY }} + version-resolver: ${{ env.VERSION_RESOLVER }} + + publish-quilt-to-modrinth: + needs: build + runs-on: ubuntu-latest + name: "Publish Quilt to Modrinth" + timeout-minutes: 30 + + steps: + - name: "Download artifacts" + uses: actions/download-artifact@v3.0.0 + with: + name: "friends-and-foes" + + - name: "Publish Quilt to Modrinth" + uses: Kir-Antipov/mc-publish@v2.1 + with: + modrinth-id: NxP9xmhw + modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} + + files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar" + version-type: ${{ env.VERSION_TYPE }} + loaders: quilt + game-versions: 1.19.0 + name: "Friends&Foes mc1.19.0-1.5.0 (Quilt)" + version: "quilt-mc1.19.0-1.5.0" + dependencies: ${{ env.QUILT_DEPENDENCIES }} + java: ${{ env.JAVA_VERSIONS }} + retry-attempts: ${{ env.RETRY_ATTEMPTS }} + retry-delay: ${{ env.RETRY_DELAY }} + version-resolver: ${{ env.VERSION_RESOLVER }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 169b1765b..aaa53bb10 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,9 +14,6 @@ env: architectury-api | depends | * FORGE_DEPENDENCIES: | architectury-api | depends | * - QUILT_DEPENDENCIES: | - qsl | depends | * - architectury-api | depends | * RETRY_ATTEMPTS: 3 RELAY_DELAY: 10000 VERSION_RESOLVER: latest @@ -47,11 +44,10 @@ jobs: - name: "Capture build artifacts" uses: actions/upload-artifact@v3.1.0 with: - name: "artifacts" + name: "friends-and-foes" path: | fabric/build/libs/friendsandfoes-fabric-mc1.19.0-1.5.0.jar forge/build/libs/friendsandfoes-forge-mc1.19.0-1.5.0.jar - quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar LICENSE.txt publish-license-to-release: @@ -64,7 +60,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish license to GitHub" uses: AButler/upload-release-assets@v3.0 @@ -82,7 +78,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish Fabric to GitHub" uses: AButler/upload-release-assets@v3.0 @@ -100,7 +96,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish Fabric to CurseForge" uses: Kir-Antipov/mc-publish@v2.1 @@ -130,7 +126,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish Fabric to Modrinth" uses: Kir-Antipov/mc-publish@v2.1 @@ -160,7 +156,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish Forge to GitHub" uses: AButler/upload-release-assets@v3.0 @@ -178,7 +174,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish Forge to CurseForge" uses: Kir-Antipov/mc-publish@v2.1 @@ -208,7 +204,7 @@ jobs: - name: "Download artifacts" uses: actions/download-artifact@v3.0.0 with: - name: "artifacts" + name: "friends-and-foes" - name: "Publish Forge to Modrinth" uses: Kir-Antipov/mc-publish@v2.1 @@ -226,82 +222,4 @@ jobs: java: ${{ env.JAVA_VERSIONS }} retry-attempts: ${{ env.RETRY_ATTEMPTS }} retry-delay: ${{ env.RETRY_DELAY }} - version-resolver: ${{ env.VERSION_RESOLVER }} - - publish-quilt-to-github: - needs: build - runs-on: ubuntu-latest - name: "Publish Quilt to GitHub" - timeout-minutes: 30 - - steps: - - name: "Download artifacts" - uses: actions/download-artifact@v3.0.0 - with: - name: "artifacts" - - - name: "Publish Quilt to GitHub" - uses: AButler/upload-release-assets@v3.0 - with: - files: 'quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar' - repo-token: ${{ secrets.GITHUB_TOKEN }} - - publish-quilt-to-curseforge: - needs: build - runs-on: ubuntu-latest - name: "Publish Quilt to CurseForge" - timeout-minutes: 30 - - steps: - - name: "Download artifacts" - uses: actions/download-artifact@v3.0.0 - with: - name: "artifacts" - - - name: "Publish Quilt to CurseForge" - uses: Kir-Antipov/mc-publish@v2.1 - with: - curseforge-id: 628248 - curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} - - files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar" - version-type: ${{ env.VERSION_TYPE }} - loaders: quilt - game-versions: 1.19.0 - name: "Friends&Foes mc1.19.0-1.5.0 (Quilt)" - dependencies: ${{ env.QUILT_DEPENDENCIES }} - java: ${{ env.JAVA_VERSIONS }} - - retry-attempts: ${{ env.RETRY_ATTEMPTS }} - retry-delay: ${{ env.RETRY_DELAY }} - version-resolver: ${{ env.VERSION_RESOLVER }} - - publish-quilt-to-modrinth: - needs: build - runs-on: ubuntu-latest - name: "Publish Quilt to Modrinth" - timeout-minutes: 30 - - steps: - - name: "Download artifacts" - uses: actions/download-artifact@v3.0.0 - with: - name: "artifacts" - - - name: "Publish Quilt to Modrinth" - uses: Kir-Antipov/mc-publish@v2.1 - with: - modrinth-id: NxP9xmhw - modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }} - - files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19.0-1.5.0.jar" - version-type: ${{ env.VERSION_TYPE }} - loaders: quilt - game-versions: 1.19.0 - name: "Friends&Foes mc1.19.0-1.5.0 (Quilt)" - version: "quilt-mc1.19.0-1.5.0" - dependencies: ${{ env.QUILT_DEPENDENCIES }} - java: ${{ env.JAVA_VERSIONS }} - retry-attempts: ${{ env.RETRY_ATTEMPTS }} - retry-delay: ${{ env.RETRY_DELAY }} version-resolver: ${{ env.VERSION_RESOLVER }} \ No newline at end of file