diff --git a/plugins/civmodcore-paper/.github/workflows/build.yml b/plugins/civmodcore-paper/.github/workflows/build.yml deleted file mode 100644 index 67b609c03..000000000 --- a/plugins/civmodcore-paper/.github/workflows/build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build - -on: - push: - branches: - - '*' - pull_request: - types: [opened, synchronize, reopened] - -jobs: - gradle_build: - name: Gradle Build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - - name: Run Gradle Build - uses: gradle/gradle-build-action@v2 - env: - CI: true - with: - arguments: 'reobf --scan' - - - name: Upload Build Artifact - uses: actions/upload-artifact@v3 - with: - name: gradle-build - path: '**/build/libs/*' diff --git a/plugins/civmodcore-paper/.github/workflows/build_completed.yml b/plugins/civmodcore-paper/.github/workflows/build_completed.yml deleted file mode 100644 index 45f8e6332..000000000 --- a/plugins/civmodcore-paper/.github/workflows/build_completed.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Build Completed - -on: - workflow_run: - types: - - "completed" - workflows: - - "Build" - -jobs: - build_completed: - uses: CivMC/.github/.github/workflows/gradle_publish.yml@master - secrets: inherit diff --git a/plugins/civmodcore-paper/.github/workflows/pr_build.yml b/plugins/civmodcore-paper/.github/workflows/pr_build.yml new file mode 100644 index 000000000..8b88a70f8 --- /dev/null +++ b/plugins/civmodcore-paper/.github/workflows/pr_build.yml @@ -0,0 +1,12 @@ +name: PR Build + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + pr_updated: + uses: CivMC/.github/.github/workflows/gradle_build.yml@master + with: + gradle_task: reobf + secrets: inherit diff --git a/plugins/civmodcore-paper/.github/workflows/pr_build_completed.yml b/plugins/civmodcore-paper/.github/workflows/pr_build_completed.yml new file mode 100644 index 000000000..81d864f9d --- /dev/null +++ b/plugins/civmodcore-paper/.github/workflows/pr_build_completed.yml @@ -0,0 +1,13 @@ +name: PR Build Completed + +on: + workflow_run: + types: + - "completed" + workflows: + - "PR Build" + +jobs: + build_completed: + uses: CivMC/.github/.github/workflows/comment_on_pr.yml@master + secrets: inherit diff --git a/plugins/civmodcore-paper/.github/workflows/publish.yml b/plugins/civmodcore-paper/.github/workflows/publish.yml deleted file mode 100644 index 62c0c5fda..000000000 --- a/plugins/civmodcore-paper/.github/workflows/publish.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Publish - -on: - push: - tags: - - 'v*.*.*' - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - java-version: '17' - distribution: 'temurin' - - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - '**/.gradle' - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Publish - run: ./gradlew publish --stacktrace - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CIVMC_NEXUS_USER: ${{ secrets.CIVMC_NEXUS_USER }} - CIVMC_NEXUS_PASSWORD: ${{ secrets.CIVMC_NEXUS_PASSWORD }} diff --git a/plugins/civmodcore-paper/.github/workflows/tag_created.yml b/plugins/civmodcore-paper/.github/workflows/tag_created.yml new file mode 100644 index 000000000..88b21ad2e --- /dev/null +++ b/plugins/civmodcore-paper/.github/workflows/tag_created.yml @@ -0,0 +1,11 @@ +name: Tag Created + +on: + push: + tags: + - 'v*.*.*' + +jobs: + tag_created: + uses: CivMC/.github/.github/workflows/gradle_publish.yml@master + secrets: inherit