diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 74ba59c..0e4e1ac 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -1,23 +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: Build on ${{ matrix.os }} - run: ./gradlew clean build \ No newline at end of file + build: + uses: OneLiteFeatherNET/workflows/.github/workflows/gradle-build-pr.yml@2.0.1 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/close_invalid_prs.yml b/.github/workflows/close_invalid_prs.yml index 8601a3c..2c0a555 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 == 'develop' }} - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: "Please do not open pull requests from the `develop` branch, create a new branch instead." \ No newline at end of file + close: + uses: OneLiteFeatherNET/workflows/.github/workflows/close-invalid-prs.yml@v2.0.1 + with: + protected-branch: master \ No newline at end of file diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml deleted file mode 100644 index 4dbbceb..0000000 --- a/.github/workflows/main-build.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Main Branch Build - -on: - push: - branches: - - develop - -jobs: - build_and_test: - if: github.repository_owner == 'OneLiteFeatherNET' - name: Build and Test - 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: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v6 - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: 25 - - name: Build on ${{ matrix.os }} - run: ./gradlew test \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36039aa..3a86b3a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,24 +1,9 @@ name: Publish JAR - on: push: - tags: - - '**' + tags: ["**"] + jobs: - build: - runs-on: ubuntu-latest - env: - ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }} - ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }} - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - name: Set up JDK 25 - uses: actions/setup-java@v5 - with: - distribution: 'temurin' - java-version: '25' - - name: Build with Gradle - run: ./gradlew build - - name: Publish to Maven - run: ./gradlew publish \ No newline at end of file + publish: + uses: OneLiteFeatherNET/workflows/.github/workflows/gradle-publish.yml@v2.0.1 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 01b8ad9..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: draft release -on: - push: - branches: - - master - - main - - develop - pull_request: - types: [opened, reopened, synchronize] - pull_request_target: - types: [opened, reopened, synchronize] -permissions: - contents: read -jobs: - update_release_draft: - permissions: - contents: write - pull-requests: write - if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v7 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..00eeb27 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,12 @@ +name: release-please +on: + push: + branches: [master] + +permissions: + contents: write + pull-requests: write + +jobs: + release: + uses: OneLiteFeatherNET/workflows/.github/workflows/release-please.yml@v2.0.1 \ No newline at end of file