diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index b18257e33..a7d855f30 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -41,15 +41,22 @@ jobs: ./gradlew build --info --full-stacktrace ./gradlew media --info --full-stacktrace + - name: Collect files + run: | + mkdir continuous + cp serverpackcreator-api/build/libs/*.jar continuous/ + cp serverpackcreator-app/build/libs/*.jar continuous/ + cp serverpackcreator-plugin-example/build/libs/*.jar continuous/ + cp media/*.dmg continuous/ + cp media/*.sh continuous/ + cp media/*.exe continuous/ + cp checksum.txt continuous/ + - name: Generate checksum uses: jmgilman/actions-generate-checksum@v1 with: patterns: | - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/serverpackcreator-app-dev.jar - serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-dev.jar + continuous/* - name: Upload to GitHub Releases uses: "marvinpinto/action-automatic-releases@latest" @@ -59,20 +66,12 @@ jobs: prerelease: true title: "Development Build" files: | - ./checksum.txt - ./media/*.dmg - ./media/*.sh - ./media/*.exe - ./serverpackcreator-app/build/libs/serverpackcreator-app-dev.jar - ./serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-dev.jar + continuous/* - - name: Collect files + - name: Get source archives run: | - mkdir continuous - cp serverpackcreator-api/build/libs/*.jar continuous/ - cp serverpackcreator-app/build/libs/*.jar continuous/ - cp serverpackcreator-plugin-example/build/libs/*.jar continuous/ - cp media/* continuous/ + wget -O continuous/source.zip https://github.com/Griefed/ServerPackCreator/archive/refs/tags/continuous.zip + wget -O continuous/source.tar.gz https://github.com/Griefed/ServerPackCreator/archive/refs/tags/continuous.tar.gz - name: Cleanup continuous id: action-ssh diff --git a/.github/workflows/github-prerelease.yml b/.github/workflows/github-prerelease.yml index 8d3895820..14a619495 100644 --- a/.github/workflows/github-prerelease.yml +++ b/.github/workflows/github-prerelease.yml @@ -71,6 +71,29 @@ jobs: ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build --info --full-stacktrace -x :serverpackcreator-api:test -x :serverpackcreator-app:test ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" media --info --full-stacktrace -x :serverpackcreator-api:test -x :serverpackcreator-app:test + - name: Rename JAR and Plugin + run: | + mv serverpackcreator-app/build/libs/serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar + mv serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar + + - name: Collect files + run: | + mkdir ${{ needs.preparations.outputs.version }} + cp serverpackcreator-api/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ + cp serverpackcreator-app/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ + cp serverpackcreator-plugin-example/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ + cp media/* ${{ needs.preparations.outputs.version }}/ + + - name: Generate checksum + uses: jmgilman/actions-generate-checksum@v1 + with: + patterns: | + ${{ needs.preparations.outputs.version }}/* + + - name: Collect checksum + run: | + cp checksum.txt ${{ needs.preparations.outputs.version }}/ + # UPLOAD ARTIFACTS - uses: actions/upload-artifact@v4 if: ${{ always() }} @@ -84,22 +107,13 @@ jobs: serverpackcreator-plugin-example/build if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - name: Rename JAR and Plugin - run: | - mv serverpackcreator-app/build/libs/serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - mv serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar - # UPLOAD ARTIFACTS - uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: jar-media-release path: | - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar + ${{ needs.preparations.outputs.version }} if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` prerelease: @@ -155,18 +169,9 @@ jobs: - uses: actions/download-artifact@v4 with: name: jar-media-release + path: ${{ needs.preparations.outputs.version }} - - name: Generate checksum - uses: jmgilman/actions-generate-checksum@v1 - with: - patterns: | - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar - - - name: Append Checksums Info + - name: Append Info uses: DamianReeves/write-file-action@v1.2 with: path: description.txt @@ -188,12 +193,21 @@ jobs: prerelease: true fail_on_unmatched_files: false files: | - checksum.txt - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar + ${{ needs.preparations.outputs.version }}/* + + - name: Get source archives + run: | + wget -O ${{ needs.preparations.outputs.version }}/source.zip https://github.com/Griefed/ServerPackCreator/archive/refs/tags/${{ needs.preparations.outputs.version }}.zip + wget -O ${{ needs.preparations.outputs.version }}/source.tar.gz https://github.com/Griefed/ServerPackCreator/archive/refs/tags/${{ needs.preparations.outputs.version }}.tar.gz + + - name: Upload release to version-dir + uses: nogsantos/scp-deploy@master + with: + src: ./${{ needs.preparations.outputs.version }} + host: ${{ secrets.SPCUPLOAD_HOST }} + remote: "${{ secrets.SPCUPLOAD_TARGET }}" + user: ${{ secrets.SPCUPLOAD_USERNAME }} + key: ${{ secrets.SPCUPLOAD_KEY }} news: name: "News on Discord" diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml index ce07c42eb..f0df0b9bc 100644 --- a/.github/workflows/github_release.yml +++ b/.github/workflows/github_release.yml @@ -69,6 +69,28 @@ jobs: ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" build --info --full-stacktrace -x :serverpackcreator-api:test -x :serverpackcreator-app:test ./gradlew -Pversion="${{ needs.preparations.outputs.version }}" media --info --full-stacktrace -x :serverpackcreator-api:test -x :serverpackcreator-app:test + - name: Rename JAR and Plugin + run: | + mv serverpackcreator-app/build/libs/serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar + mv serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar + + - name: Collect files + run: | + mkdir ${{ needs.preparations.outputs.version }} + cp serverpackcreator-api/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ + cp serverpackcreator-app/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ + cp serverpackcreator-plugin-example/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ + cp media/* ${{ needs.preparations.outputs.version }}/ + + - name: Generate checksum + uses: jmgilman/actions-generate-checksum@v1 + with: + patterns: | + ${{ needs.preparations.outputs.version }}/* + + - name: Collect checksum + run: | + cp checksum.txt ${{ needs.preparations.outputs.version }}/ # UPLOAD ARTIFACTS - uses: actions/upload-artifact@v4 @@ -83,59 +105,15 @@ jobs: serverpackcreator-plugin-example/build if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - name: Rename JAR and Plugin - run: | - mv serverpackcreator-app/build/libs/serverpackcreator-app-${{ needs.preparations.outputs.version }}.jar serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - mv serverpackcreator-plugin-example/build/libs/serverpackcreator-plugin-example-${{ needs.preparations.outputs.version }}.jar serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar - # UPLOAD ARTIFACTS - uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: jar-media-release path: | - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar + ${{ needs.preparations.outputs.version }} if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` - - name: Collect files - run: | - mkdir ${{ needs.preparations.outputs.version }} - cp serverpackcreator-api/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ - cp serverpackcreator-app/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ - cp serverpackcreator-plugin-example/build/libs/*.jar ${{ needs.preparations.outputs.version }}/ - cp media/* ${{ needs.preparations.outputs.version }}/ - - - name: Upload release to version-dir - uses: nogsantos/scp-deploy@master - with: - src: ./${{ needs.preparations.outputs.version }} - host: ${{ secrets.SPCUPLOAD_HOST }} - remote: "${{ secrets.SPCUPLOAD_TARGET }}" - user: ${{ secrets.SPCUPLOAD_USERNAME }} - key: ${{ secrets.SPCUPLOAD_KEY }} - - - name: Cleanup latest - id: action-ssh - uses: tiyee/action-ssh@v1.0.1 - with: - host: ${{ secrets.SPCUPLOAD_HOST }} - username: ${{ secrets.SPCUPLOAD_USERNAME }} - privateKey: ${{ secrets.SPCUPLOAD_KEY }} - command: 'rm -f ${{ secrets.SPCUPLOAD_TARGET }}/latest/*' - - - name: Upload release to latest-dir - uses: nogsantos/scp-deploy@master - with: - src: ./${{ needs.preparations.outputs.version }}/* - host: ${{ secrets.SPCUPLOAD_HOST }} - remote: "${{ secrets.SPCUPLOAD_TARGET }}/latest" - user: ${{ secrets.SPCUPLOAD_USERNAME }} - key: ${{ secrets.SPCUPLOAD_KEY }} - release: name: "Release" if: ${{ always() }} @@ -183,18 +161,9 @@ jobs: - uses: actions/download-artifact@v4 with: name: jar-media-release + path: ${{ needs.preparations.outputs.version }} - - name: Generate checksum - uses: jmgilman/actions-generate-checksum@v1 - with: - patterns: | - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar - - - name: Append Checksums Info + - name: Append Info uses: DamianReeves/write-file-action@v1.2 with: path: description.txt @@ -216,12 +185,39 @@ jobs: prerelease: false fail_on_unmatched_files: false files: | - checksum.txt - media/*.dmg - media/*.sh - media/*.exe - serverpackcreator-app/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}.jar - serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar + ${{ needs.preparations.outputs.version }}/* + + - name: Get source archives + run: | + wget -O ${{ needs.preparations.outputs.version }}/source.zip https://github.com/Griefed/ServerPackCreator/archive/refs/tags/${{ needs.preparations.outputs.version }}.zip + wget -O ${{ needs.preparations.outputs.version }}/source.tar.gz https://github.com/Griefed/ServerPackCreator/archive/refs/tags/${{ needs.preparations.outputs.version }}.tar.gz + + - name: Upload release to version-dir + uses: nogsantos/scp-deploy@master + with: + src: ./${{ needs.preparations.outputs.version }} + host: ${{ secrets.SPCUPLOAD_HOST }} + remote: "${{ secrets.SPCUPLOAD_TARGET }}" + user: ${{ secrets.SPCUPLOAD_USERNAME }} + key: ${{ secrets.SPCUPLOAD_KEY }} + + - name: Cleanup latest + id: action-ssh + uses: tiyee/action-ssh@v1.0.1 + with: + host: ${{ secrets.SPCUPLOAD_HOST }} + username: ${{ secrets.SPCUPLOAD_USERNAME }} + privateKey: ${{ secrets.SPCUPLOAD_KEY }} + command: 'rm -f ${{ secrets.SPCUPLOAD_TARGET }}/latest/*' + + - name: Upload release to latest-dir + uses: nogsantos/scp-deploy@master + with: + src: ./${{ needs.preparations.outputs.version }}/* + host: ${{ secrets.SPCUPLOAD_HOST }} + remote: "${{ secrets.SPCUPLOAD_TARGET }}/latest" + user: ${{ secrets.SPCUPLOAD_USERNAME }} + key: ${{ secrets.SPCUPLOAD_KEY }} news: name: "News on Discord"