Skip to content

Nightly Release

Nightly Release #410

Workflow file for this run

name: Nightly Release
on:
workflow_dispatch:
inputs:
skipTests:
description: 'Skip tests'
required: false
default: false
type: boolean
workflow_call:
jobs:
gradleValidation:
name: Gradle Validation
uses: ./.github/workflows/reusable-gradleValidation.yml
unitTests:
if: ${{ !inputs.skipTests }}
name: Unit Tests
needs: gradleValidation
uses: ./.github/workflows/reusable-unitTests.yml
integrationTests:
if: ${{ !inputs.skipTests }}
name: Integration Tests
needs: [ gradleValidation, unitTests ]
uses: ./.github/workflows/reusable-integrationTests.yml
# integrationTestsEAP:
# name: Integration Tests EAP
# needs: gradleValidation
# uses: ./.github/workflows/reusable-integrationTests.yml
# with:
# platformVersion: 222-EAP-SNAPSHOT
codeInspection:
if: ${{ !inputs.skipTests }}
name: Code Inspection
needs: gradleValidation
uses: ./.github/workflows/reusable-codeInspection.yml
# Prepare and publish the Gradle Plugins repository
release:
name: Release to Gradle Plugins
needs:
- unitTests
- integrationTests
# - integrationTestsEAP
- codeInspection
if: always()
runs-on: ubuntu-latest
steps:
# Fail if the conditional job failed
- name: Safety Check
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
# Publish the plugin to the Gradle Plugins
- name: Publish Plugin
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew publish -Psnapshot=true -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD
# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: ./build/libs/*-SNAPSHOT.jar