diff --git a/.github/workflows/build-plugin-local.yml b/.github/workflows/build-plugin-local.yml new file mode 100644 index 00000000..3cd337f9 --- /dev/null +++ b/.github/workflows/build-plugin-local.yml @@ -0,0 +1,40 @@ +name: Build Plugin (Local) + +on: + workflow_dispatch: + inputs: + version: + description: 'Plugin version' + required: true + default: '1.0.0' + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: local + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Set Config + run: | + mkdir src/main/resources/config + touch src/main/resources/config/local.properties + echo "${{ vars.DEVPILOT_CONFIG }}" >> src/main/resources/config/local.properties + + - name: Build plugin + run: ./gradlew buildPlugin + + - name: Upload plugin artifact + uses: actions/upload-artifact@v2 + with: + name: DevPilot-local + path: build/distributions/DevPilot-*.zip \ No newline at end of file diff --git a/.github/workflows/build-plugin-production.yml b/.github/workflows/build-plugin-production.yml new file mode 100644 index 00000000..c9b56803 --- /dev/null +++ b/.github/workflows/build-plugin-production.yml @@ -0,0 +1,40 @@ +name: Build Plugin (Production) + +on: + workflow_dispatch: + inputs: + version: + description: 'Plugin version' + required: true + default: '1.0.0' + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: production + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Set Config + run: | + mkdir src/main/resources/config + touch src/main/resources/config/local.properties + echo "${{ vars.DEVPILOT_CONFIG }}" >> src/main/resources/config/local.properties + + - name: Build plugin + run: ./gradlew buildPlugin + + - name: Upload plugin artifact + uses: actions/upload-artifact@v2 + with: + name: DevPilot-production + path: build/distributions/DevPilot-*.zip \ No newline at end of file diff --git a/.github/workflows/build-plugin-test.yml b/.github/workflows/build-plugin-test.yml new file mode 100644 index 00000000..81230891 --- /dev/null +++ b/.github/workflows/build-plugin-test.yml @@ -0,0 +1,40 @@ +name: Build Plugin (Test) + +on: + workflow_dispatch: + inputs: + version: + description: 'Plugin version' + required: true + default: '1.0.0' + +jobs: + build: + runs-on: ubuntu-latest + environment: + name: test + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Set Config + run: | + mkdir src/main/resources/config + touch src/main/resources/config/local.properties + echo "${{ vars.DEVPILOT_CONFIG }}" >> src/main/resources/config/local.properties + + - name: Build plugin + run: ./gradlew buildPlugin + + - name: Upload plugin artifact + uses: actions/upload-artifact@v2 + with: + name: DevPilot-test + path: build/distributions/DevPilot-*.zip \ No newline at end of file