build(deps): bump com.github.johnrengelman.shadow from 7.1.2 to 8.1.1 #10
Workflow file for this run
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
jobs: | |
formatting: | |
name: Format code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- run: chmod +x gradlew | |
- name: Format code | |
run: ./gradlew spotlessApply | |
- name: Commit changes | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
# Check for changes | |
git diff --staged --quiet || { | |
# Commit and push if there are changes | |
git commit -m "style: format code with spotless" | |
git push | |
} || { | |
# This block executes if the git diff command above returns true (no changes) | |
echo "No changes to commit." | |
} | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: formatting | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- run: chmod +x gradlew | |
- run: ./gradlew spotlessApply | |
- name: Build project | |
run: ./gradlew build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: plugin-files | |
path: build/libs/*.jar |