Converting PCGroups and CLI to root and subproject for easier building #11
Workflow file for this run
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 | |
| 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 :pcgroups-cli:clean :pcgroups-cli:dist | |
| - name: Validate artifacts were created | |
| run: | | |
| CLI_BUILD="../pcgroups-cli/build" | |
| for f in cg.jar cg.zip cg.tar; do | |
| if [ -f "$CLI_BUILD/$f" ]; then | |
| echo "Validation successful: $CLI_BUILD/$f was created." | |
| else | |
| echo "Validation failed: $CLI_BUILD/$f was not found." | |
| exit 1 | |
| fi | |
| done |