diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 6a59bde6c..22b6e6e47 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -1,43 +1,50 @@ -name: Build Check - -on: - schedule: - - cron: '0 12 * * *' - jobs: RunOnLinux: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - name: Grant Permission - run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - name: Run Tests - run: ./mvnw -B -ntp clean test - + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + name: Grant Permission + run: sudo chmod +x ./mvnw + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Run Tests + run: ./mvnw -B -ntp clean test RunOnMacOs: - runs-on: macos-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - name: Grant Permission - run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - name: Run Tests - run: ./mvnw -B -ntp clean test - + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + name: Grant Permission + run: sudo chmod +x ./mvnw + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Run Tests + run: ./mvnw -B -ntp clean test RunOnWindows: - runs-on: windows-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - name: Run Tests - run: ./mvnw.cmd -B -ntp clean test + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Run Tests + run: ./mvnw.cmd -B -ntp clean test +name: Build Check +on: + repository_dispatch: + types: trigger-ga___builds.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1f49d3112..10b2b2d8b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,55 +1,50 @@ -# This workflow is designed to build PRs for AHC. Note that it does not actually publish AHC, just builds and test it. -# Docs: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Build PR - -on: - push: - branches: - - main - pull_request: - - workflow_dispatch: - inputs: - name: - description: 'Github Actions' - required: true - default: 'Github Actions' - jobs: RunOnLinux: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - name: Grant Permission - run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - name: Run Tests - run: ./mvnw -B -ntp clean test - + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + name: Grant Permission + run: sudo chmod +x ./mvnw + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Run Tests + run: ./mvnw -B -ntp clean test RunOnMacOs: - runs-on: macos-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - name: Grant Permission - run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - name: Run Tests - run: ./mvnw -B -ntp clean test - + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + name: Grant Permission + run: sudo chmod +x ./mvnw + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Run Tests + run: ./mvnw -B -ntp clean test RunOnWindows: - runs-on: windows-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - name: Run Tests - run: ./mvnw.cmd -B -ntp clean test + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Run Tests + run: ./mvnw.cmd -B -ntp clean test +name: Build PR +on: + repository_dispatch: + types: trigger-ga___maven.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51dc38f90..a571577ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,52 +1,42 @@ -name: Release - -on: - workflow_dispatch: - inputs: - name: - description: 'Github Actions - Release' - required: true - default: 'Github Actions - Release' - jobs: - Publish: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - - uses: actions/checkout@v4 - - - name: Grant Permission - run: sudo chmod +x ./mvnw - - - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: '11' - - - name: Remove old Maven Settings - run: rm -f /home/runner/.m2/settings.xml - - - name: Maven Settings - uses: s4u/maven-settings-action@v2.2.0 - with: - servers: | - [{ - "id": "ossrh", - "username": "${{ secrets.OSSRH_USERNAME }}", - "password": "${{ secrets.OSSRH_PASSWORD }}" - }] - - - name: Import GPG - uses: crazy-max/ghaction-import-gpg@v5.2.0 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - - name: Build - run: mvn -ntp -B clean verify install -DskipTests - - - name: Publish to Maven Central - env: - GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - run: mvn -ntp -B deploy -DskipTests -Dgpg.keyname=${GPG_KEY_NAME} -Dgpg.passphrase=${GPG_PASSPHRASE} + - continue-on-error: true + uses: actions/checkout@v4 + - continue-on-error: true + name: Grant Permission + run: sudo chmod +x ./mvnw + - continue-on-error: true + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: '11' + - continue-on-error: true + name: Remove old Maven Settings + run: rm -f /home/runner/.m2/settings.xml + - continue-on-error: true + name: Maven Settings + uses: s4u/maven-settings-action@v2.2.0 + with: + servers: "[{\n \"id\": \"ossrh\",\n \"username\": \"${{ secrets.OSSRH_USERNAME\ + \ }}\",\n \"password\": \"${{ secrets.OSSRH_PASSWORD }}\"\n}]\n" + - continue-on-error: true + name: Import GPG + uses: crazy-max/ghaction-import-gpg@v5.2.0 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + - continue-on-error: true + name: Build + run: mvn -ntp -B clean verify install -DskipTests + - continue-on-error: true + env: + GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + name: Publish to Maven Central + run: mvn -ntp -B deploy -DskipTests -Dgpg.keyname=${GPG_KEY_NAME} -Dgpg.passphrase=${GPG_PASSPHRASE} +name: Release +on: + repository_dispatch: + types: trigger-ga___release.yml