|
15 | 15 | required: false
|
16 | 16 | default: false
|
17 | 17 | type: boolean
|
18 |
| - doTests: |
19 |
| - description: 'Run tests before the release' |
20 |
| - required: false |
21 |
| - default: true |
22 |
| - type: boolean |
23 | 18 |
|
24 | 19 | env:
|
25 | 20 | MODULE_ID: cbvalidation
|
26 |
| - doTests: ${{ inputs.doTests || false }} |
27 |
| - snapshot: ${{ inputs.snapshot || false }} |
28 | 21 |
|
29 | 22 | jobs:
|
30 |
| - ########################################################################################## |
31 |
| - # Module Tests |
32 |
| - ########################################################################################## |
33 |
| - tests: |
34 |
| - if: ${{ inputs.doTests }} |
35 |
| - secrets: inherit |
36 |
| - uses: ./.github/workflows/tests.yml |
37 |
| - |
38 |
| - ########################################################################################## |
39 |
| - # Format Source Code |
40 |
| - # This only fires on `development`, stable releases should not have auto-formatting |
41 |
| - ########################################################################################## |
42 |
| - format: |
43 |
| - name: Code Auto-Formatting |
44 |
| - runs-on: ubuntu-20.04 |
45 |
| - if: ${{ inputs.snapshot && ( success() || !inputs.doTests ) }} |
46 |
| - needs: [ tests ] |
47 |
| - steps: |
48 |
| - - uses: actions/checkout@v3 |
49 |
| - |
50 |
| - - name: Auto-format |
51 |
| - uses: Ortus-Solutions/[email protected] |
52 |
| - with: |
53 |
| - cmd: run-script format |
54 |
| - |
55 |
| - - name: Commit Format Changes |
56 |
| - uses: stefanzweifel/git-auto-commit-action@v4 |
57 |
| - with: |
58 |
| - commit_message: Apply cfformat changes |
59 |
| - |
60 | 23 | ##########################################################################################
|
61 | 24 | # Build & Publish
|
62 | 25 | ##########################################################################################
|
63 | 26 | build:
|
64 | 27 | name: Build & Publish
|
65 |
| - if: ${{ success() || !inputs.doTests }} |
66 |
| - needs: [ tests, format ] |
67 | 28 | runs-on: ubuntu-20.04
|
68 | 29 | steps:
|
69 | 30 | - name: Checkout Repository
|
|
75 | 36 | distribution: "temurin"
|
76 | 37 | java-version: "11"
|
77 | 38 |
|
78 |
| - - name: Test |
79 |
| - run: | |
80 |
| - echo "${{ env.snapshot }} ${{ env.doTests }}" |
81 |
| -
|
82 | 39 | # - name: Setup CommandBox
|
83 | 40 | # uses: Ortus-Solutions/[email protected]
|
84 | 41 | # with:
|
|
0 commit comments