feat(api-detector-core): add shared exclusion rule engine #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: API Detector Core - Build | |
| on: | |
| push: | |
| branches-ignore: | |
| - main | |
| - maintenance | |
| paths: | |
| - 'api-detector-core/**' | |
| - '.github/workflows/api-detector-core-build.yml' | |
| jobs: | |
| Calculate-Version: | |
| uses: ./.github/workflows/semantic-version-calculate.yml | |
| with: | |
| fail_on_empty_version: false | |
| fail_on_existing_tag: false | |
| project_dir: api-detector-core | |
| secrets: | |
| sem_rel_token_token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
| Determine-Release-Type: | |
| needs: Calculate-Version | |
| uses: ./.github/workflows/determine-release-type.yml | |
| Build-api-detector-core: | |
| name: Build API Detector Core | |
| needs: Calculate-Version | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| env: | |
| GRADLE_PROPERTIES_FILE: ./api-detector-core/gradle.properties | |
| GRADLE_VERSION_REGEX: version\s*=\s*[0-9]\\+\.[0-9]\\+\.[0-9]\\+[a-zA-Z0-9.-]* | |
| VERSION: ${{ needs.Calculate-Version.outputs.next_version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Java | |
| uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| - name: Update version in Gradle property file | |
| if: ${{ env.VERSION != '' }} | |
| run: | | |
| echo "VERSION=${{ env.VERSION }}-PRERELEASE" | |
| echo ===== Before - ${{ env.GRADLE_PROPERTIES_FILE }} ===== | |
| cat ${{ env.GRADLE_PROPERTIES_FILE }} | |
| sed -i "s/${{ env.GRADLE_VERSION_REGEX }}/version = ${{ env.VERSION }}-PRERELEASE/g" ${{ env.GRADLE_PROPERTIES_FILE }} | |
| echo ===== After - ${{ env.GRADLE_PROPERTIES_FILE }} ===== | |
| cat ${{ env.GRADLE_PROPERTIES_FILE }} | |
| - name: Build API Detector Core | |
| run: | | |
| cd api-detector-core | |
| chmod +x ./gradlew | |
| ./gradlew build | |
| env: | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.SEDR_AUTOMATION_TOKEN }} | |
| - name: Upload build reports | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: api-detector-core-build-reports | |
| path: api-detector-core/build/reports/** | |
| Workflow-Summary: | |
| name: Workflow Summary | |
| needs: [Build-api-detector-core, Determine-Release-Type] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Output build completion | |
| run: | | |
| echo "API Detector Core ${{ needs.Determine-Release-Type.outputs.release_type }} build workflow completed" | |
| echo "::notice title=Build Complete::API Detector Core ${{ needs.Determine-Release-Type.outputs.release_type }} build workflow completed" |