From 76de4c2f5d18cd40265d5c6f6a083e1f0733ff75 Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Fri, 24 Nov 2023 14:17:58 +0100 Subject: [PATCH] Add to main branch to register action --- .github/actions/build_adapter/action.yml | 22 ++++++++ .github/actions/build_plugin/action.yml | 34 ++++++++++++ .../build-development-jars-and-publish.yml | 55 +++++++++++++++++++ .github/workflows/build-jars-on-push.yml | 2 - 4 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 .github/actions/build_adapter/action.yml create mode 100644 .github/actions/build_plugin/action.yml create mode 100644 .github/workflows/build-development-jars-and-publish.yml diff --git a/.github/actions/build_adapter/action.yml b/.github/actions/build_adapter/action.yml new file mode 100644 index 0000000000..5aacf09738 --- /dev/null +++ b/.github/actions/build_adapter/action.yml @@ -0,0 +1,22 @@ +name: "Build Adapter" +description: "Builds the adapter and runs tests" + +inputs: + adapter: + required: true + description: "Name of the adapter to build" + +runs: + using: "composite" + steps: + - name: Test Adapter + uses: gradle/gradle-build-action@v2 + with: + arguments: test --scan + build-root-directory: ./adapters/${{ inputs.adapter }} + - name: Build Adapter + uses: gradle/gradle-build-action@v2 + with: + arguments: buildRelease --scan + build-root-directory: ./adapters/${{ inputs.adapter }} + diff --git a/.github/actions/build_plugin/action.yml b/.github/actions/build_plugin/action.yml new file mode 100644 index 0000000000..7ecf405dfa --- /dev/null +++ b/.github/actions/build_plugin/action.yml @@ -0,0 +1,34 @@ +name: Build Plugin +description: "Builds the plugin and runs tests" + +runs: + using: "composite" + steps: + - uses: actions/checkout@v2 + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: "master" + - name: Get Flutter dependencies + run: flutter pub get + shell: bash + working-directory: ./app + - name: Run tests + run: flutter test + shell: bash + working-directory: ./app + - name: Build web app + run: flutter build web --release --no-tree-shake-icons + shell: bash + working-directory: ./app + - name: Test Plugin + uses: gradle/gradle-build-action@v2 + with: + arguments: test --scan + build-root-directory: ./plugin + - name: Build Plugin + uses: gradle/gradle-build-action@v2 + with: + arguments: buildRelease --scan + build-root-directory: ./plugin + diff --git a/.github/workflows/build-development-jars-and-publish.yml b/.github/workflows/build-development-jars-and-publish.yml new file mode 100644 index 0000000000..718dad088e --- /dev/null +++ b/.github/workflows/build-development-jars-and-publish.yml @@ -0,0 +1,55 @@ +name: Build Development Jars and Publish + +on: + pull_request: + branches: + - develop + paths: + - 'plugins/**' + - 'adapters/**' + - '.github/workflows/build-development-jars-and-publish.yml' + +jobs: + build-publish-development: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + - name: Build Plugin + uses: ./.github/actions/build-plugin + - name: Build Basic Adapter + uses: ./.github/actions/build-adapter + with: + adapter: BasicAdapter + - name: Build Citizens Adapter + uses: ./.github/actions/build-adapter + with: + adapter: CitizensAdapter + - name: Build CombatLogX Adapter + uses: ./.github/actions/build-adapter + with: + adapter: CombatLogXAdapter + - name: Build MythicMobs Adapter + uses: ./.github/actions/build-adapter + with: + adapter: MythicMobsAdapter + - name: Build RPGRegions Adapter + uses: ./.github/actions/build-adapter + with: + adapter: RPGRegionsAdapter + - name: Build SuperiorSkyblock Adapter + uses: ./.github/actions/build-adapter + with: + adapter: SuperiorSkyblockAdapter + - name: Build Vault Adapter + uses: ./.github/actions/build-adapter + with: + adapter: VaultAdapter + - name: Build WorldGuard Adapter + uses: ./.github/actions/build-adapter + with: + adapter: WorldGuardAdapter diff --git a/.github/workflows/build-jars-on-push.yml b/.github/workflows/build-jars-on-push.yml index f787fa30f4..8b02bcdaa1 100644 --- a/.github/workflows/build-jars-on-push.yml +++ b/.github/workflows/build-jars-on-push.yml @@ -3,8 +3,6 @@ name: Build Jars on Push on: push: branches: - - main - - develop - feature/** jobs: