Skip to content

Add distribution

Add distribution #149

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@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
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 }}