Skip to content

Bump gradle/actions from 3 to 4 #130

Bump gradle/actions from 3 to 4

Bump gradle/actions from 3 to 4 #130

Workflow file for this run

name: Build and Test with Gradle
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
gradle: ["6.9.4", "7.6.4", "8.8"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ matrix.gradle }}
- name: Build with Gradle
run: gradle --stacktrace check
- name: Release next version
if: github.ref == 'refs/heads/main' && matrix.gradle == '6.9.4'
run: gradle :libyear-gradle-plugin:release -Prelease.customUsername="${USER}" -Prelease.customPassword="${PW}"
env:
USER: ${{ github.actor }}
PW: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Gradle Plugin Portal
if: github.ref == 'refs/heads/main' && matrix.gradle == '6.9.4'
run: gradle :libyear-gradle-plugin:publishPlugins -Pgradle.publish.key="${KEY}" -Pgradle.publish.secret="${SECRET}"
env:
KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}