|
| 1 | +# Implement to use environment secrets someday, At the moment GH Actions doesn't support those in reusable workflows (ref: https://github.com/actions/runner/issues/1490) |
| 2 | +# at least that's what I found. |
1 | 3 | name: Nightly Build |
2 | 4 |
|
3 | 5 | on: |
|
28 | 30 | value: ${{ jobs.build.result }} |
29 | 31 |
|
30 | 32 | workflow_dispatch: |
| 33 | + inputs: |
| 34 | + skip_tagging_and_releases: |
| 35 | + required: false |
| 36 | + default: true |
| 37 | + type: boolean |
| 38 | + description: Skips Tagging & releases, since workflow_call isn't available for github.event_name, default is true |
31 | 39 |
|
32 | 40 | concurrency: |
33 | 41 | # Allow only one workflow per any non-`main` branch. |
|
51 | 59 | permissions: |
52 | 60 | # contents write is needed to create Nightly Releases. |
53 | 61 | contents: write |
54 | | - issues: write |
| 62 | +# issues: write |
55 | 63 | pull-requests: write |
56 | 64 |
|
57 | 65 | outputs: |
|
89 | 97 | uses: actions/checkout@v4 |
90 | 98 | with: |
91 | 99 | fetch-depth: 0 # Required for tags |
| 100 | + # persists credentials locally if tagging and releases are not skipped. |
| 101 | + persist-credentials: ${{ ! inputs.skip_tagging_and_releases }} |
| 102 | + ref: ${{ (inputs.is_PR && inputs.PR_NUMBER) && github.event.pull_request.head.sha || '' }} |
92 | 103 |
|
93 | 104 | - name: Set up Java 21 |
94 | 105 | uses: actions/setup-java@v4 |
95 | 106 | with: |
96 | 107 | distribution: 'temurin' |
97 | 108 | java-version: '21' |
98 | | - cache: ${{ (github.ref == 'refs/heads/main' && 'gradle') || '' }} |
| 109 | + cache: ${{ (!(inputs.is_PR && inputs.PR_NUMBER) && github.ref == 'refs/heads/main' && 'gradle') || '' }} |
99 | 110 |
|
100 | 111 | - name: Set up Node.js |
101 | 112 | uses: actions/setup-node@v4 |
|
149 | 160 | - name: Install Node.js Packages |
150 | 161 | run: npm install |
151 | 162 |
|
| 163 | + - name: Install Cordova CLI |
| 164 | + run: npm install -g cordova |
| 165 | + |
152 | 166 | - name: Run npm setup |
153 | 167 | run: npm run setup |
154 | 168 |
|
|
207 | 221 | platforms/android/app/build/outputs/apk/debug/app-debug.apk |
208 | 222 | body: | |
209 | 223 | Automated Nightly (pre-release) Releases for Today |
210 | | - \n\n[Compare Changes](https://github.com/${{ github.repository }}/compare/${{ env.TAG_COMMIT }}...${{ github.sha }}) |
| 224 | + |
| 225 | + [Compare Changes](https://github.com/${{ github.repository }}/compare/${{ env.TAG_COMMIT }}...${{ github.sha }}) |
211 | 226 |
|
212 | 227 | - name: Update Last Comment by bot (If ran in PR) |
213 | 228 | if: inputs.is_PR |
|
0 commit comments