Skip to content

Merge pull request #52 from mwhapples/AphCleanUp #286

Merge pull request #52 from mwhapples/AphCleanUp

Merge pull request #52 from mwhapples/AphCleanUp #286

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BB_VERSION: '3.1.0'
BB_CHANGELIST: ''
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'corretto'
cache: maven
- name: Build with Maven
run: |
mvn -B install --file pom.xml -DskipTests -Drevision=${{ env.BB_VERSION }} -Dsha1=-${{ github.sha }} -Dchangelist=${{ env.BB_CHANGELIST }}
- name: Get docs
run: brailleblaster-app/scripts/get-docs.sh brailleblaster-app/target/dist/docs
- name: Zip distribution
run: |
mkdir brailleblaster-continuous
cp -a -t brailleblaster-continuous brailleblaster-app/target/dist/*
zip -r brailleblaster-continuous.zip brailleblaster-continuous
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: brailleblaster
path: brailleblaster-continuous.zip
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
if: github.ref == 'ref/heads/main' && github.event_name != 'pull_request'
uses: advanced-security/maven-dependency-submission-action@v4
with:
maven-args: -Drevision=${{ env.BB_VERSION }} -Dsha1=-${{ github.sha }} -Dchangelist=${{ env.BB_CHANGELIST }}
continuous_release:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: brailleblaster
- name: Update continuous tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/continuous',
sha: context.sha
})
- name: Update continuous release
uses: softprops/action-gh-release@v2
with:
name: continuous
tag_name: continuous
files: brailleblaster-continuous.zip
prerelease: true
draft: false