Refactor GitHub Actions Workflows #352
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 | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - '**' | |
| # don't run on dependabot branches. Dependabot will create pull requests, which will then be run instead | |
| - '!dependabot/**' | |
| tags: | |
| - '**' | |
| workflow_dispatch: | |
| schedule: | |
| # build it monthly: At 05:00 on day-of-month 1. | |
| - cron: '0 5 1 * *' | |
| # if another commit is added to the same branch or PR (same github.ref), | |
| # then cancel already running jobs and start a new build. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| env: | |
| LANG: 'en_US.UTF-8' | |
| jobs: | |
| compile: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| cache: 'maven' | |
| - name: Build with Maven | |
| run: | | |
| ./mvnw --show-version --errors --batch-mode \ | |
| -Pshading \ | |
| verify | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: compile-artifact | |
| if-no-files-found: error | |
| path: | | |
| target/pmd-designer-*.jar |