Skip to content

Release LITIENGINE #190

Release LITIENGINE

Release LITIENGINE #190

Workflow file for this run

name: Release LITIENGINE
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
incrementVersion:
type: choice
description: "increment version?"
required: true
default: 'none'
options:
- NO
- PATCH
- MINOR
- MAJOR
schedule:
# Midnight every day
- cron: "0 0 * * *"
jobs:
gradle:
name: Release build
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- name: Print project version
uses: gradle/gradle-build-action@v2
with:
arguments: printGitSemVer
- name: Increment patch version
if: inputs.incrementVersion == 'PATCH'
uses: gradle/gradle-build-action@v2
with:
arguments: incrementPatchVersion
- name: Increment minor version
if: inputs.incrementVersion == 'MINOR'
uses: gradle/gradle-build-action@v2
with:
arguments: incrementMinorVersion
- name: Increment major version
if: inputs.incrementVersion == 'MAJOR'
uses: gradle/gradle-build-action@v2
with:
arguments: incrementMajorVersion
- name: Push tags
if: inputs.incrementVersion != 'NO'
uses: gradle/gradle-build-action@v2
env:
GRGIT_USER: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: pushTags
- name: Publish
uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
with:
arguments: |
publishToSonatype closeSonatypeStagingRepository