Skip to content

BL-738

BL-738 #2419

Workflow file for this run

name: Snapshots
on:
push:
branches:
- development
# Manual Trigger for Snapshot builds
workflow_dispatch:
#Cancel running builds if another push to branch is made while this build is running
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
MODULE_ID: ${{ github.event.repository.name }}
jobs:
##########################################################################################
# Format Source Code
##########################################################################################
format:
name: Code Auto-Formatting
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 21
- name: Format Java Source
run: ./gradlew spotlessApply --stacktrace
- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply cfformat changes
#############################################
# Tests First baby! We fail, no build :(
#############################################
tests:
uses: ./.github/workflows/tests.yml
needs: format
secrets: inherit
permissions:
checks: write
pull-requests: write
contents: read
issues: read
#############################################
# Build Snapshot Release
#############################################
build:
uses: ./.github/workflows/release.yml
needs: [tests, format]
secrets: inherit
permissions:
checks: write
contents: write
packages: write
with:
snapshot: true