Merge pull request #43 from jnmoyne/jnm/13-mar-26 #9
This file contains hidden or 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: 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 |