diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71bfd8459..36171e483 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,30 +48,17 @@ jobs: env: BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }} - - name: Archive artifacts (Floodgate Bungee) - # See https://github.com/actions/upload-artifact/commits - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + - name: Archive Artifacts + uses: GeyserMC/actions/upload-multi-artifact@master if: success() with: - name: Floodgate Bungee - path: bungee/build/libs/floodgate-bungee.jar - if-no-files-found: error - - - name: Archive artifacts (Floodgate Spigot) - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 - if: success() - with: - name: Floodgate Spigot - path: spigot/build/libs/floodgate-spigot.jar - if-no-files-found: error - - - name: Archive artifacts (Floodgate Velocity) - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 - if: success() - with: - name: Floodgate Velocity - path: velocity/build/libs/floodgate-velocity.jar - if-no-files-found: error + artifacts: | + bungee/build/libs/floodgate-bungee.jar + spigot/build/libs/floodgate-spigot.jar + velocity/build/libs/floodgate-velocity.jar + database/mongo/build/libs/floodgate-mongo-database.jar + database/mysql/build/libs/floodgate-mysql-database.jar + database/sqlite/build/libs/floodgate-sqlite-database.jar - name: Publish to Maven Repository if: ${{ github.repository == 'GeyserMC/Floodgate' }} @@ -116,6 +103,35 @@ jobs: spigot/build/libs/floodgate-spigot.jar velocity/build/libs/floodgate-velocity.jar + - name: Get DB Release Metadata + if: ${{ success() && github.repository == 'GeyserMC/Floodgate' && github.ref_name == 'master' }} + uses: GeyserMC/actions/release@master + id: metadata_db + with: + appID: ${{ secrets.RELEASE_APP_ID }} + appPrivateKey: ${{ secrets.RELEASE_APP_PK }} + files: | + mongodb:database/mongo/build/libs/floodgate-mongo-database.jar + mysql:database/mysql/build/libs/floodgate-mysql-database.jar + sqlite:database/sqlite/build/libs/floodgate-sqlite-database.jar + releaseEnabled: false + saveMetadata: true + releaseProject: 'floodgate-db' + releaseVersion: ${{ steps.get-version.outputs.VERSION }} + + - name: Publish DBs to Downloads API + if: ${{ success() && github.ref_name == 'master' && github.repository == 'GeyserMC/Floodgate' }} + uses: GeyserMC/actions/upload-release@master + with: + username: ${{ vars.DOWNLOADS_USERNAME }} + privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }} + host: ${{ secrets.DOWNLOADS_SERVER_IP }} + metadata: metadata_db.json + files: | + database/mongo/build/libs/floodgate-mongo-database.jar + database/mysql/build/libs/floodgate-mysql-database.jar + database/sqlite/build/libs/floodgate-sqlite-database.jar + - name: Notify Discord if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Floodgate' }} uses: GeyserMC/actions/notify-discord@master diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8d59fecfd..050f3436e 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -38,27 +38,14 @@ jobs: - name: Build Floodgate run: ./gradlew build - - name: Archive artifacts (Floodgate Bungee) - # See https://github.com/actions/upload-artifact/commits - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + - name: Archive Artifacts + uses: GeyserMC/actions/upload-multi-artifact@master if: success() with: - name: Floodgate Bungee - path: bungee/build/libs/floodgate-bungee.jar - if-no-files-found: error - - - name: Archive artifacts (Floodgate Spigot) - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 - if: success() - with: - name: Floodgate Spigot - path: spigot/build/libs/floodgate-spigot.jar - if-no-files-found: error - - - name: Archive artifacts (Floodgate Velocity) - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 - if: success() - with: - name: Floodgate Velocity - path: velocity/build/libs/floodgate-velocity.jar - if-no-files-found: error + artifacts: | + bungee/build/libs/floodgate-bungee.jar + spigot/build/libs/floodgate-spigot.jar + velocity/build/libs/floodgate-velocity.jar + database/mongo/build/libs/floodgate-mongo-database.jar + database/mysql/build/libs/floodgate-mysql-database.jar + database/sqlite/build/libs/floodgate-sqlite-database.jar \ No newline at end of file