Add YT link to README. Remove a bit of extra code #33
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 | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'maven' | |
- name: Grant execute permission for mvnw | |
run: chmod +x mvnw | |
- name: Build with Maven wrapper | |
run: ./mvnw -B package --file pom.xml | |
- name: Generate JaCoCo Badge | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
generate-branches-badge: true | |
- name: Commit the badge (if it changed) | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config --global user.name 'Github workflow' | |
git config --global user.email 'nowhere@gmail.com' | |
git add -A | |
git commit -m "Commit autogenerated JaCoCo coverage badge (& other changed stuff)" | |
git push | |
fi | |
- name: Upload JaCoCo coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-report | |
path: target/site/jacoco/ |