Skip to content

dispatch microserivce maven release #17

dispatch microserivce maven release

dispatch microserivce maven release #17

name: dispatch microserivce maven release
on:
workflow_dispatch:
inputs:
release-version:
required: true
description: release version to build
development-version:
required: true
description: next development version to set
service:
required: true
description: service/directory to build (wls-broadcast-service, ...)
jobs:
run-mvn-release-prepare:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup git user
uses: fregante/setup-git-user@v2
- name: Install Java and Maven
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "temurin"
cache: 'maven'
cache-dependency-path: '${{ github.event.inputs.service }}/pom.xml'
- name: Perform maven release
run: >
mvn -B -ntp release:prepare -f ${{ github.event.inputs.service }}/pom.xml
-DreleaseVersion=${{ github.event.inputs.release-version }}
-DdevelopmentVersion=${{ github.event.inputs.development-version }}
-Dtag=${{ github.event.inputs.service }}/${{ github.event.inputs.release-version }}
-Darguments="-DskipTests"
build-github-release:
permissions:
contents: write
needs:
- run-mvn-release-prepare
uses:
./.github/workflows/callable-create-github-release-from-tag.yml
with:
tag: ${{ github.event.inputs.service }}/${{ github.event.inputs.release-version }}
service: ${{ github.event.inputs.service }}
files: "${{ github.event.inputs.service }}/target/*.jar\n${{ github.event.inputs.service }}/target/openapi.json"
build-github-container-image:
permissions:
packages: write
needs:
- run-mvn-release-prepare
uses:
./.github/workflows/callable-create-github-container-image.yml
with:
tag: ${{ github.event.inputs.service }}/${{ github.event.inputs.release-version }}
service: ${{ github.event.inputs.service }}