update dependabot.yml and build.yml #66
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 Minecraft Plugin | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Set up JDK 16 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 16 | |
distribution: 'temurin' | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NoMoreTNTChainCrash | |
path: ${{ github.workspace }}/build/libs/ | |
dependabot: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v2 | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Auto-merge GitHub Actions updates | |
if: steps.metadata.outputs.package-ecosystem == 'github_actions' | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
GH_TOKEN: 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 | |
PR_URL: ${{github.event.pull_request.html_url}} | |
- name: Auto-merge other Dependabot PRs | |
if: | | |
steps.metadata.outputs.package-ecosystem != 'github_actions' && | |
( | |
steps.metadata.outputs.update-type == 'version-update:semver-patch' || | |
steps.metadata.outputs.update-type == 'version-update:semver-minor' || | |
steps.metadata.outputs.dependency-type == 'direct:development' | |
) | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
GH_TOKEN: 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 | |
PR_URL: ${{github.event.pull_request.html_url}} |