Add a guard to /autosort to check if an argument was given. #27
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: ci | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Restore Gradle cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'microsoft' | |
java-version: 21 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Build with Gradle | |
run: | | |
chmod +x gradlew | |
./gradlew build --stacktrace | |
- name: Install rename | |
run: sudo apt-get install -y rename | |
# This is only needed when using shadow jar | |
# - name: Rename file | |
# run: | | |
# cd ./build/libs/ | |
# rename -f 's/-all//;' '' * | |
- name: Archive plugin jars on GitHub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: AutomaticInventory | |
path: build/libs |