Skip to content

Deployment

Deployment #73

Workflow file for this run

name: Deployment
on:
workflow_dispatch:
inputs:
version_type:
description: 'Select version type:'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: ${{ github.event.inputs.version_type }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Prepare for publish
run: |
./gradlew publish \
-PreleaseVersion="${{ steps.version.outputs.version }}" \
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \
-Psigning.secretKeyRingFile="${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}"
- name: Release in Maven Central
run: |
./gradlew jreleaserRelease \
-PreleaseVersion="${{ steps.version.outputs.version }}" \
-PmavenCentralUsername="${{ secrets.MAVEN_CENTRAL_USERNAME }}" \
-PmavenCentralPasswordToken="${{ secrets.MAVEN_CENTRAL_PASSWORD_TOKEN }}" \
-PgithubToken="${{ secrets.GITHUB_TOKEN }}"