Skip to content

build maven release

build maven release #4

name: build maven release
on:
workflow_dispatch:
inputs:
release-version:
required: true
description: release version
development-version:
required: true
description: next development version
service:
required: true
description: service to build (backend, frontend, ...)
jobs:
prepare-release:
permissions:
contents: write
runs-on: ubuntu-latest
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 backend/pom.xml
-DreleaseVersion=${{ github.event.inputs.release-version }}
-DdevelopmentVersion=${{ github.event.inputs.development-version }}
-Dtag=${{ github.event.inputs.service }}/v${{ github.event.inputs.release-version }}
-Darguments="-DskipTests"
build-gh-release:
permissions:
contents: write
needs:
- prepare-release
uses:
./.github/workflows/callable-create-release-from-tag.yml
with:
tag: ${{ github.event.inputs.service }}/v${{ github.event.inputs.release-version }}
service: ${{ github.event.inputs.service }}
build-ghcr-image:
permissions:
packages: write
needs:
- prepare-release
uses:
./.github/workflows/callable-create-ghcr-image-from-tag.yml
with:
tag: ${{ github.event.inputs.service }}/v${{ github.event.inputs.release-version }}
service: ${{ github.event.inputs.service }}