Fix POM issues #158
Workflow file for this run
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: build PR | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| # Needed if the cache is out of whack and needs to be totally refreshed | |
| # - name: Clear Maven cache | |
| # run: rm -rf ~/.m2/repository/* | |
| - name: Clear GitHub Maven cache | |
| run: | | |
| rm -rf ~/.m2/repository/com/github/* | |
| rm -rf ~/.m2/repository/io/github/* | |
| rm -rf ~/.m2/repository/org/bonej/* | |
| rm -rf ~/.m2/repository/ch/beancounter/* | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| # key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Set up Maven settings | |
| uses: s4u/maven-settings-action@v2 | |
| with: | |
| servers: '[{"id": "github-bonej-plus", "username": "${{ github.actor }}", "password": "${{ secrets.BONEJ_PLUS_REPO }}"},{"id": "github-beancounter", "username": "${{ github.actor }}", "password": "${{ secrets.BONEJ_PLUS_REPO }}"}]' | |
| githubServer: false | |
| - name: Set up CI environment | |
| run: .github/setup.sh | |
| # Needed if there's some stale artefacts or config blocking the build | |
| - name: Build with Maven | |
| run: mvn clean install -U | |
| - name: Execute the build | |
| run: .github/build.sh |