diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index cfe0046..527e135 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -1,38 +1,7 @@ name: Build PR on: [pull_request] + jobs: - build_pr: - if: github.repository_owner == 'OneLiteFeatherNET' - name: Build Pull Request Branch - runs-on: ${{ matrix.os }} - env: - ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }} - ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - name: Checkout Repository - uses: actions/checkout@v6 - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: 25 - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v6 - - name: Build on ${{ matrix.os }} - run: ./gradlew clean build test -# - name: Generate JaCoCo Coverage Report -# if: matrix.os == 'ubuntu-latest' -# run: ./gradlew jacocoTestReport -# - name: Jacoco Report to PR -# id: jacoco -# uses: madrapps/jacoco-report@v1.7.2 -# with: -# paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml -# token: ${{ secrets.GITHUB_TOKEN }} -# min-coverage-overall: 40 -# min-coverage-changed-files: 60 -# title: Code Coverage -# update-comment: true \ No newline at end of file + build: + uses: OneLiteFeatherNET/workflows/.github/workflows/gradle-build-pr.yml@v2 + secrets: inherit diff --git a/.github/workflows/close_invalid_prs.yml b/.github/workflows/close_invalid_prs.yml index 432d368..6f8a768 100644 --- a/.github/workflows/close_invalid_prs.yml +++ b/.github/workflows/close_invalid_prs.yml @@ -1,14 +1,10 @@ name: Close invalid PRs - on: pull_request_target: - types: [ opened ] + types: [opened] jobs: - run: - if: ${{ github.repository != github.event.pull_request.head.repo.full_name && github.head_ref == 'main' }} - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: "Please do not open pull requests from the `main` branch, create a new branch instead." \ No newline at end of file + close: + uses: OneLiteFeatherNET/workflows/.github/workflows/close-invalid-prs.yml@v2 + with: + protected-branch: main diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 05adf71..4f198c0 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,37 +1,9 @@ name: Publish JAR - on: push: - tags: - - 'v*' + tags: ["v*"] jobs: publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v6 - - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: 25 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v6 - - - name: Build - env: - ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }} - ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }} - run: ./gradlew build - - - name: Publish - env: - ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }} - ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }} - run: ./gradlew publish + uses: OneLiteFeatherNET/workflows/.github/workflows/gradle-publish.yml@v2 + secrets: inherit diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 1a3f154..a8e91c9 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -1,19 +1,12 @@ name: release-please - on: push: - branches: - - main + branches: [main] permissions: contents: write pull-requests: write jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v5 - with: - config-file: release-please-config.json - manifest-file: .release-please-manifest.json + release: + uses: OneLiteFeatherNET/workflows/.github/workflows/release-please.yml@v2 diff --git a/release-please-config.json b/release-please-config.json index 55a026d..b821e1c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,6 +4,7 @@ "include-component-in-tag": false, "include-v-in-tag": true, "bootstrap-sha": "HEAD", + "pull-request-header": "", "packages": { ".": { "package-name": "butterfly",