update missing version number. #68
Workflow file for this run
This file contains 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: Java Build | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- release-* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Checkout artifact repo (for release) | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/checkout@v3 | |
with: | |
repository: robcast/digilib-repo | |
ref: gh-pages | |
path: digilib-repo | |
- name: Copy existing maven-repo (for release) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
mkdir -p target/site/maven-repo | |
cp -rp digilib-repo/maven-repo/* target/site/maven-repo/ | |
- name: Build tests using Maven | |
run: mvn -Pbuild-all -DskipTests=false test -B | |
- name: Deploy javadoc and Maven artefacts (for release) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: mvn -Pbuild-all javadoc:aggregate deploy -DaltDeploymentRepository=repo::default::file:target/site/maven-repo -B | |
- name: Deploy javadoc and maven-repo to digilib-repo (for release) | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
repo: robcast/digilib-repo | |
target_branch: gh-pages | |
build_dir: target/site | |
env: | |
GITHUB_TOKEN: ${{ secrets.DIGILIB_REPO_TOKEN }} | |
- name: Build documentation pages | |
if: ${{ github.ref == 'refs/heads/master' }} | |
run: mvn site site:site --projects=doc | |
- name: Deploy html site to gh-pages | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: doc/target/site | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: add WAR to GH Release (for release) | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: webapp/target/digilib-webapp-*.war | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |