Skip to content

Draft: Improved the publishing workflow #15

Draft: Improved the publishing workflow

Draft: Improved the publishing workflow #15

Workflow file for this run

name: Publish
on:
pull_request:
# workflow_dispatch:
# inputs:
# major_version:
# description: 'Major version'
# required: true
# type: number
# minor_version:
# description: 'Minor version'
# required: true
# type: number
# patch_version:
# description: 'Patch version'
# required: true
# type: number
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Bump release version
id: bump_release_version
uses: MeilCli/bump-release-action@v2
with:
config_path: '.github/bump.yml'
bump: minor
dry_run: true
- name: Publish to Maven
env:
MAJOR_VERSION: ${{ github.event.inputs.major_version }}
MINOR_VERSION: ${{ github.event.inputs.minor_version }}
PATCH_VERSION: ${{ github.event.inputs.patch_version }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
run: echo ${{ steps.bump_release_version.next_version }}