Attempt to fix building #171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - 'LICENSE' | |
| - 'README.md' | |
| - '.gitignore' | |
| - '.idea/copyright/*.xml' | |
| - '.github/workflows/pullrequest.yml' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get Release Info | |
| id: release-info | |
| uses: GeyserMC/actions/previous-release@master | |
| with: | |
| data: ${{ vars.RELEASEACTION_PREVRELEASE }} | |
| - name: Checkout repository and submodules | |
| # See https://github.com/actions/checkout/commits | |
| uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
| with: | |
| submodules: recursive | |
| - name: Validate Gradle Wrapper | |
| # See https://github.com/gradle/wrapper-validation-action/commits | |
| uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2 | |
| - name: Setup Java | |
| # See https://github.com/actions/setup-java/commits | |
| uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Setup Gradle | |
| # See https://github.com/gradle/actions/commits | |
| uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | |
| with: | |
| cache-read-only: ${{ github.ref_name != 'master' && github.ref_name != 'development' }} | |
| - name: Build Floodgate | |
| run: ./gradlew build | |
| env: | |
| BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }} | |
| - name: Archive Artifacts | |
| uses: GeyserMC/actions/upload-multi-artifact@master | |
| if: success() | |
| with: | |
| 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' }} | |
| run: ./gradlew publish | |
| env: | |
| BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }} | |
| ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }} | |
| ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }} | |
| - name: Get Version | |
| if: ${{ success() && github.repository == 'GeyserMC/Floodgate' && github.ref_name == 'master' }} | |
| id: get-version | |
| run: | | |
| version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2) | |
| echo "VERSION=${version}" >> $GITHUB_OUTPUT | |
| - name: Get Release Metadata | |
| if: ${{ success() && github.repository == 'GeyserMC/Floodgate' && github.ref_name == 'master' }} | |
| uses: GeyserMC/actions/release@master | |
| id: metadata | |
| with: | |
| appID: ${{ secrets.RELEASE_APP_ID }} | |
| appPrivateKey: ${{ secrets.RELEASE_APP_PK }} | |
| files: | | |
| bungee:bungee/build/libs/floodgate-bungee.jar | |
| spigot:spigot/build/libs/floodgate-spigot.jar | |
| velocity:velocity/build/libs/floodgate-velocity.jar | |
| releaseEnabled: false | |
| saveMetadata: true | |
| releaseProject: 'floodgate' | |
| releaseVersion: ${{ steps.get-version.outputs.VERSION }} | |
| - name: Publish 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 }} | |
| files: | | |
| bungee/build/libs/floodgate-bungee.jar | |
| 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 }} | |
| 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 | |
| with: | |
| discordWebhook: ${{ secrets.DISCORD_WEBHOOK }} | |
| status: ${{ job.status }} | |
| body: ${{ steps.metadata.outputs.body }} |