Skip to content

Release

Release #55

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
branch:
description: Release branch (needed for major and minor releases)
required: true
version:
description: Release version
required: true
deploy-skip:
description: Set to true to prevent maven deploy plugin to actually deploy the artifacts.
required: true
default: false
concurrency: rel-${{ github.ref }}
defaults:
run:
shell: bash
jobs:
repo-prep:
name: Prepare repository
runs-on: ubuntu-latest
steps:
- name: show-inputs
run: |
echo "Version: ${{ inputs.version }} " >> $GITHUB_STEP_SUMMARY
echo "Release branch: ${{ inputs.branch }} " >> $GITHUB_STEP_SUMMARY
echo "Workflow branch: ${{ github.ref_name }} " >> $GITHUB_STEP_SUMMARY
echo "Deploy skip: ${{ inputs.deploy-skip }} " >> $GITHUB_STEP_SUMMARY
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: test-checkout
run: |
pwd
find $GITHUB_WORKSPACE
- name: Maven environment setup
run: |
cat $GITHUB_WORKSPACE/.github/env/release-env | sed -r '/^\s*$/d' >> $GITHUB_ENV
create-tag:
name: Create tag
runs-on: ubuntu-latest
needs: repo-prep
steps:
- name: Create version commit
run: |
pwd
ls
./set-version.sh ${{ inputs.version }}
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -a -m "Set version to ${{ inputs.version }}"
- name: Tag commit
run: git tag --force ${{ inputs.version }}
- name: Push changes
run: git push --force origin refs/tags/${{ inputs.version }}
keycloak-client:
name: Keycloak Client
needs: [repo-prep, create-tag]
uses: ./.github/workflows/x-keycloak-client.yml
with:
mvn-url: ${{ needs.env.outputs.mvn-releases-url }}
tag: ${{ inputs.version }}
deploy-skip: ${{ inputs.deploy-skip }}
secrets:
MVN_USERNAME: ${{ secrets.MVN_USERNAME }}
MVN_TOKEN: ${{ secrets.MVN_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}