Release 2.3.7 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: create release | |
run-name: "Release ${{ inputs.releaseversion }}" | |
env: | |
IMAGE_NAME_DB: "msamt-online/db" | |
REGISTRY: "ghcr.io/bungeberatung" | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseversion: | |
description: 'Release version (yyyy.mm.<no>)' | |
required: true | |
type: string | |
default: "X.Y.Z" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: write | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: set git config | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |
git config --global user.name "$(gh api /users/${GITHUB_ACTOR} | jq .name -r)" | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
cache: 'maven' | |
- name: Setup settings.xml | |
uses: s4u/[email protected] | |
with: | |
override: true | |
servers: | | |
[{ | |
"id": "repo.jenkins-ci.org", | |
"username": "${{ secrets.OSS_JENKINS_USER }}", | |
"password": "${{ secrets.OSS_JENKINS_PASS }}" | |
}] | |
- name: Create release | |
id: create-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
export TZ="Europe/Berlin" | |
git checkout -b release/${{ inputs.releaseversion }} | |
mvn release:prepare release:perform -B -DreleaseVersion=${{ inputs.releaseversion }} -DpushChanges=false -DskipTests=true -DskipITs=true -DlocalCheckout=true -D"arguments=-Dmaven.deploy.skip=true -DskipTests=true -DskipITs=true" | |
# manually push | |
git push --tags | |
git push origin release/${{ inputs.releaseversion }} | |
# write version info | |
cat <<EOF >target/config.json | |
{ | |
"version": "${{ inputs.releaseversion }}" | |
} | |
EOF | |
- name: Create Pull Request | |
id: create-pr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: Update report | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
branch: release/${{ inputs.releaseversion }} | |
delete-branch: true | |
title: '[Release] ${{ inputs.releaseversion }}' | |
body: | | |
Release Plugin v${{ inputs.releaseversion }} | |
labels: | | |
release | |
assignees: hypery2k | |
draft: false | |
- name: Conventional Changelog Action | |
id: create-changelog | |
uses: TriPSs/conventional-changelog-action@v5 | |
with: | |
input-file: CHANGELOG.md | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
version-file: target/config.json | |
pre-release: true | |
skip-bump: true | |
skip-tag: true | |
skip-on-empty: true | |
tag-prefix: 'v' |