Update all non-major dependencies #179
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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
verify-gradle-wrapper: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3 | |
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0 | |
build: | |
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
jdk: [11, 15, 16] | |
steps: | |
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3 | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-jdk-${{ matrix.jdk }}-gradlewrapper-${{ hashFiles('**/gradle-wrapper.properties') }}-gradlescripts-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-jdk-${{ matrix.jdk }}-gradlewrapper-${{ hashFiles('**/gradle-wrapper.properties') }}-gradlescripts- | |
- name: Set up JDK | |
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: adopt | |
- run: ./gradlew build --stacktrace --warning-mode all | |
release: | |
runs-on: ubuntu-latest | |
needs: [build, verify-gradle-wrapper] # build job must pass before we can release | |
if: github.event_name == 'push' | |
&& github.ref == 'refs/heads/main' | |
&& github.repository == 'MinimallyCorrect/JavaTransformer' | |
&& !contains(toJSON(github.event.commits.*.message), '[skip ci]') | |
&& !contains(toJSON(github.event.commits.*.message), '[skip release]') | |
steps: | |
- name: Check out code | |
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3 | |
with: | |
fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: releasing-${{ runner.os }}-jdk-${{ matrix.jdk }}-gradlewrapper-${{ hashFiles('**/gradle-wrapper.properties') }}-gradlescripts-${{ hashFiles('**/*.gradle*') }} | |
- name: Set up Java 11 | |
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 | |
with: | |
java-version: 11 | |
distribution: adopt | |
- name: Build and publish to github | |
run: ./gradlew -P releasing build publish githubRelease -s | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
DEPLOYMENT_REPO_URL_RELEASE: ${{secrets.DEPLOYMENT_REPO_URL_RELEASE}} | |
DEPLOYMENT_REPO_URL_SNAPSHOT: ${{secrets.DEPLOYMENT_REPO_URL_SNAPSHOT}} | |
DEPLOYMENT_REPO_USERNAME: ${{secrets.DEPLOYMENT_REPO_USERNAME}} | |
DEPLOYMENT_REPO_PASSWORD: ${{secrets.DEPLOYMENT_REPO_PASSWORD}} |