Skip to content

Prepare release b4e1b84e0795a48275c626cde426159d5eb9c2d9 by @thomaskwscott #7

Prepare release b4e1b84e0795a48275c626cde426159d5eb9c2d9 by @thomaskwscott

Prepare release b4e1b84e0795a48275c626cde426159d5eb9c2d9 by @thomaskwscott #7

name: Prepare release and tag
run-name: Prepare release ${{ github.sha }} by @${{ github.actor }}
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
type: string
description: 'Release version'
required: false
next:
type: string
description: 'Next development version'
required: false
publish:
type: boolean
default: 'true'
description: 'Trigger publish workflow after tag'
jobs:
build:
runs-on: [ ubuntu-latest ]
permissions:
contents: write
pull-requests: write
actions: write
steps:
- uses: actions/checkout@v3
- name: Setup GPG
id: gpg
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.CONDUKTOR_BOT_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github
- name: Maven release prepare
id: prepare
run: |
mvn --batch-mode release:prepare -DreleaseVersion=${{ inputs.version }} -DdevelopmentVersion=${{ inputs.next }} --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.CONDUKTORBOT_REPO_WRITE }}
- name: Read value from release properties
id: release_property
uses: christian-draeger/[email protected]
with:
path: 'release.properties'
properties: 'scm.tag'
- name: Start publish workflow
if: ${{ inputs.publish }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'conduktor',
repo: 'conduktor-gateway',
workflow_id: 'publish.yml',
ref: 'main',
inputs: {
from: `${{ steps.release_property.outputs.scm-tag }}`,
},
});