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