Skip to content

Merge pull request #43 from jnmoyne/jnm/13-mar-26 #9

Merge pull request #43 from jnmoyne/jnm/13-mar-26

Merge pull request #43 from jnmoyne/jnm/13-mar-26 #9

Workflow file for this run

name: Partitioned Consumer Groups CLI Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'pcgroups-cli/**'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./pcgroups-cli
steps:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Check out code
uses: actions/checkout@v4
- name: Build with Gradle
run: chmod +x gradlew && ./gradlew clean dist
- name: Build with Maven
run: mvn clean package
- name: Validate artifacts were created
run: |
FILE_PATH="build/cg.jar"
if [ -f "$FILE_PATH" ]; then
echo "Validation successful: $FILE_PATH was created."
else
echo "Validation failed: $FILE_PATH was not found."
exit 1 # Fails the workflow step
fi
FILE_PATH="build/cg.zip"
if [ -f "$FILE_PATH" ]; then
echo "Validation successful: $FILE_PATH was created."
else
echo "Validation failed: $FILE_PATH was not found."
exit 1 # Fails the workflow step
fi
FILE_PATH="build/cg.tar"
if [ -f "$FILE_PATH" ]; then
echo "Validation successful: $FILE_PATH was created."
else
echo "Validation failed: $FILE_PATH was not found."
exit 1 # Fails the workflow step
fi
FILE_PATH="target/cg.jar"
if [ -f "$FILE_PATH" ]; then
echo "Validation successful: $FILE_PATH was created."
else
echo "Validation failed: $FILE_PATH was not found."
exit 1 # Fails the workflow step
fi