Skip to content

Implement Automated GitFlow Release Workflow #1

Implement Automated GitFlow Release Workflow

Implement Automated GitFlow Release Workflow #1

Workflow file for this run

# This workflow builds the project on every push and pull request to the main branch
name: Build and Verify
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
# Use the latest version of Ubuntu for the build environment
runs-on: ubuntu-latest
steps:
# Check out the repository code so the workflow can access it
- name: Checkout repository
uses: actions/checkout@v4
# Set up JDK 21, which is required by the project
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
# Cache Gradle packages and wrapper to speed up the build process
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Grant execute permission to the Gradle wrapper script
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
# Run the main build task
- name: Build with Gradle
run: ./gradlew build --info