384 new feature integrate asyncapi files #836
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: Java CI with Maven (PR) | |
on: | |
pull_request: | |
types: [opened, synchronize, ready_for_review, review_requested, labeled] | |
concurrency: pr-${{ github.event.pull_request.id }} | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
if: contains(github.event.pull_request.labels.*.name, 'release') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check if version is updated | |
uses: avides/[email protected] | |
id: version_check | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
file-to-check: pom.xml | |
continue-on-error: true | |
- name: Warn about version specification | |
if: steps.version_check.outcome != 'success' | |
uses: thollander/actions-comment-pull-request@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications. | |
- name: Fail | |
if: steps.version_check.outcome != 'success' | |
uses: cutenode/action-always-fail@v1 | |
- name: New software version | |
if: steps.version_check.outcome == 'success' | |
run: echo "New kloadgen version is " ${{ steps.version_check.outputs.version }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "17" | |
distribution: "adopt" | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
check-labels: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.mergeable == true | |
steps: | |
- name: Warn about missing labels | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'release') && !contains(github.event.pull_request.labels.*.name, 'documentation') }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: "This pull request hasn't been labeled as `release` nor `documentation`. Please ensure this is intentional before merging." | |
comment_tag: label-warn |