Skip to content

Commit

Permalink
Update build.yml +new gradle dep submitter
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuilder1961 committed Sep 25, 2024
1 parent b673124 commit dac5543
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,21 @@ jobs:
java: [
21 # Latest Java LTS & minimum supported by Minecraft
]
# and run on the latest dists of Linux, MacOs, and Windows
# and run on the latest dists of Linux, MacOS, and Windows
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2

- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin

- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: setup gradle
uses: gradle/actions/setup-gradle@v4

- name: build
run: ./gradlew build --info --stacktrace
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/gradle_dependency_submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: gradle_dependency_submission

on:
# Don't build if only text-based files were changed.
# Prevents waiting for unnecessary checks/actions
push:
paths-ignore:
- '**.md'
- '**.txt'
pull_request:
paths-ignore:
- '**.md'
- '**.txt'

# remainder of the file is copied from https://github.com/marketplace/actions/build-with-gradle#the-dependency-submission-action
permissions:
contents: write

jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4

0 comments on commit dac5543

Please sign in to comment.