chore(deps): update plugin com.gradle.develocity to v3.18.1 #79
This file contains 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: Build & Deploy | |
on: | |
push: | |
paths-ignore: | |
- '.gitignore' | |
- '.mergify.yml' | |
- 'CHANGELOG.md' | |
- 'LICENSE' | |
- 'README.md' | |
- 'renovate.json' | |
pull_request: | |
jobs: | |
validation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Validate the Gradle Wrapper | |
uses: gradle/[email protected] | |
build: | |
needs: | |
- validation | |
strategy: | |
matrix: | |
os: [ ubuntu, macos, windows ] | |
java-version: [ 11, 17 ] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: adopt | |
- name: Run quality assurance and test with coverage | |
run: ./gradlew clean check | |
- name: CodeCov | |
if: ${{ contains('Linux', runner.os) }} | |
uses: codecov/[email protected] | |
with: | |
directory: "build/reports/jacoco" | |
release: | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
packages: write | |
concurrency: | |
# Allow only one release at a time. | |
group: release-${{ github.event.number || github.ref }} | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
outputs: | |
release-status: ${{ env.release_status }} | |
# Release only where secrets are available. | |
if: >- | |
!github.event.repository.fork | |
&& ( | |
github.event_name != 'pull_request' | |
|| github.event.pull_request.head.repo.full_name == github.repository | |
) | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: adopt | |
- name: Find the version of Node from package.json | |
id: node-version | |
run: echo "version=$(jq -r .engines.node package.json)" >> $GITHUB_OUTPUT | |
- name: Install Node | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ steps.node-version.outputs.version }} | |
- name: Release library | |
env: | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm install | |
npx semantic-release | |
documentation-deploy: | |
needs: | |
- release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
if: needs.release.outputs.release-status == 'released' | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Generate and deploy documentation | |
uses: SmartOperatingBlock/[email protected] | |
with: | |
should-generate-code-documentation: true | |
code-documentation-generation-command: ./gradlew javadoc | |
code-documentation-dst-folder: './build/docs/javadoc' | |
code-documentation-site-folder: 'documentation/code-doc' | |
should-generate-openapi-documentation: true | |
openapi-documentation-input-file: 'docs/rest-api/rest-api-docs.yml' | |
openapi-documentation-dst-folder: 'documentation/openapi-doc' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
success: | |
runs-on: ubuntu-latest | |
needs: | |
- validation | |
- build | |
- release | |
- documentation-deploy | |
if: >- | |
always() && ( | |
contains(join(needs.*.result, ','), 'failure') | |
|| !contains(join(needs.*.result, ','), 'cancelled') | |
) | |
steps: | |
- name: Verify that there were no failures | |
run: ${{ !contains(join(needs.*.result, ','), 'failure') }} |