Skip to content

Build and Release

Build and Release #6

Workflow file for this run

---
name: Build and Release
on:
workflow_dispatch:
inputs:
druid-version:
description: 'Select the Druid version to build the authorizer for.'
required: true
type: choice
options:
- druid-26.0.0
- druid-30.0.0
stackable-version:
description: 'The stackable "patch" version to use for this release (e.g., "0").'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Java
id: setup_java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: 'temurin'
java-version: ${{ github.event.inputs.druid-version == 'druid-26.0.0' && '11' || '17' }}
cache: 'maven'
- name: Set variables
id: vars
run: |
VERSION=${{ github.event.inputs.druid-version }}-stackable${{ github.event.inputs.stackable-version }}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Configure Git Identity
run: |
git config --global user.email "info@stackable.tech"
git config --global user.name "stacky-mcstackface"
- name: Run Maven Release Prepare
run: |
mvn -B release:prepare \
-DpreparationProfiles=${{ github.event.inputs.druid-version }} \
-DreleaseVersion=${{ env.VERSION }} \
-DupdateWorkingCopyVersions=false \
-DpushChanges=false
- name: Push release branch
run: git push origin release/${{ env.VERSION }}
- name: Run Maven Release Perform
run: |
mvn -B release:perform \
-DreleaseProfiles=${{ github.event.inputs.druid-version }} \
-Dgoals="clean install"
- name: Release to GitHub
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
with:
files: |
target/checkout/target/*.jar
target/checkout/target/bom.*
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: release/${{ github.event.inputs.druid-version }}-stackable${{ github.event.inputs.stackable-version }}
# Due to our current setup it doesn't make sense to generate release notes automatically because the "previous" version might be for something entirely different (e.g. another Druid version)
generate_release_notes: false
name: ${{ github.event.inputs.druid-version }}-stackable${{ github.event.inputs.stackable-version }}