Release LITIENGINE #243
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
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: | |
- none | |
- 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@v4.1.0 | |
with: | |
fetch-depth: 0 | |
- name: JDK Setup | |
uses: actions/setup-java@v3.13.0 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Gradle Setup | |
uses: gradle/gradle-build-action@v2 | |
- name: Increment version | |
if: inputs.incrementVersion != 'none' | |
run: ./gradlew incrementVersion --increment=${{inputs.incrementVersion}} | |
- name: Publish | |
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 }} | |
run: ./gradlew publishToSonatype closeSonatypeStagingRepository | |
- name: Push tags | |
if: inputs.incrementVersion != 'no' | |
env: | |
GRGIT_USER: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew pushTags |