Merge pull request #41 from gdgib/G2-1883-Release #100
This file contains hidden or 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 CI with Maven | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'adopt' | |
| java-version: 17 | |
| cache: 'maven' | |
| - name: Joint Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/jo-ui/node_modules | |
| ${{ github.workspace }}/jo-ui/node | |
| key: ${{ runner.os }}-jointui-${{ hashFiles('**/package-lock.json', '**/pom.xml', '**/node/npm', '**/node/ng') }} | |
| restore-keys: | | |
| ${{ runner.os }}-jointui- | |
| - name: Build with Maven | |
| # Maven deploy on changes (or manual run) to main, otherwise just package it | |
| run: mvn -s "${GITHUB_WORKSPACE}/.github/workflows/maven-settings.xml" -B ${{ (((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && (github.ref == 'refs/heads/main')) && 'deploy' || 'package' }} --file pom.xml -Prelease,release-snapshot,no-test | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} |