Update dependencies #217
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: Deploy Maven artifacts | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: m2 deployment | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Set up a compatible Java version | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 11 | |
cache: maven | |
- name: Potentially restore node from cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
frontend/node | |
key: node-${{ hashFiles('frontend/pom.xml') }} | |
restore-keys: node- | |
- name: Potentially restore npm dependencies from cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: npm- | |
- name: Check out the m2 repository | |
uses: actions/checkout@v4 | |
with: | |
ref: m2 | |
path: m2 | |
- name: Generate revision | |
id: revision | |
run: echo "revision=$(date +%Y.%m%d.%H%M%S)-${{ github.sha }}" >> $GITHUB_OUTPUT | |
- name: Build the artifacts | |
run: mvn clean deploy | |
--batch-mode | |
-DmaxWarnings=0 | |
-DaltDeploymentRepository=m2::file:m2 | |
-Drevision=${{ steps.revision.outputs.revision }} | |
- name: Deploy the artifacts to GitHub | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: ${{ steps.revision.outputs.revision }} | |
cwd: m2 |