Update actions/setup-java digest to 7a6d8a8 #348
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
# | |
# CI build that assembles artifacts and runs tests. | |
# If validation is successful this workflow releases from the main dev branch. | |
# | |
# - skipping CI: add [skip ci] to the commit message | |
# - skipping release: add [skip release] to the commit message | |
# | |
name: CI | |
permissions: read-all | |
on: | |
push: | |
branches: ['main'] | |
tags-ignore: [v*] # release tags are autogenerated after a successful CI, no need to run CI against them | |
pull_request: | |
branches: ['**'] | |
jobs: | |
gradle_wrapper_validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 # docs: https://github.com/actions/checkout | |
with: | |
fetch-depth: '0' # https://github.com/shipkit/shipkit-auto-version#fetch-depth-on-ci | |
- name: Gradle wrapper validation | |
uses: gradle/wrapper-validation-action@8a2cbc9ccf0390177c07106bbfb02746e8f0413b # v2.1.0 | |
build: | |
runs-on: ubuntu-latest | |
needs: [ gradle_wrapper_validation ] | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 # https://github.com/actions/checkout | |
with: | |
fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci | |
- name: Setup Java | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@aff52e5be96935327d77c5529075184377dc4371 # v3 | |
- name: Perform Build via Gradle | |
run: ./gradlew build publishToMavenLocal | |
- name: Publish Plugin and Create GitHub Release via Gradle | |
# Release job, only for pushes to the main development branch | |
if: github.event_name == 'push' | |
&& github.ref == 'refs/heads/main' | |
&& github.repository == 'MythicDrops/mythicdrops-gradle-plugin' | |
&& !contains(toJSON(github.event.commits.*.message), '[skip release]') | |
run: ./gradlew publishPlugins githubRelease --scan | |
env: | |
# Gradle env variables docs: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_environment_variables | |
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} | |
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |