|
42 | 42 | VERSION_SUFFIX: -beta |
43 | 43 |
|
44 | 44 | jobs: |
| 45 | + check-tokens: |
| 46 | + name: Check the access tokens used for publishing |
| 47 | + runs-on: ubuntu-latest |
| 48 | + if: inputs.packagingDebug != true && inputs.skipForumPublish != true |
| 49 | + outputs: |
| 50 | + publish-forum: ${{ secrets.INTERSECTBOT_FORUM_TOKEN != '' }} |
| 51 | + publish-github: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN != '' }} |
| 52 | + steps: |
| 53 | + - id: dump-token-state |
| 54 | + name: Log the state of the tokens |
| 55 | + env: |
| 56 | + PUBLISH_FORUM: ${{ secrets.INTERSECTBOT_FORUM_TOKEN != '' }} |
| 57 | + PUBLISH_GITHUB: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN != '' }} |
| 58 | + run: | |
| 59 | + echo "PUBLISH_FORUM='$PUBLISH_FORUM'" |
| 60 | + echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'" |
| 61 | +
|
| 62 | + # debug-check-tokens: |
| 63 | + # name: Debug state of check-tokens |
| 64 | + # needs: [check-tokens] |
| 65 | + # runs-on: ubuntu-latest |
| 66 | + # steps: |
| 67 | + # - id: dump |
| 68 | + # name: Dump check-tokens output |
| 69 | + # env: |
| 70 | + # PUBLISH_FORUM: ${{ needs.check-tokens.outputs.publish-forum }} |
| 71 | + # PUBLISH_GITHUB: ${{ needs.check-tokens.outputs.publish-github }} |
| 72 | + # run: | |
| 73 | + # echo "PUBLISH_FORUM='$PUBLISH_FORUM'" |
| 74 | + # echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'" |
| 75 | + |
45 | 76 | generate-keys: |
46 | 77 | name: Generate Version-Specific Network Keys |
47 | 78 | runs-on: ubuntu-latest |
@@ -326,45 +357,9 @@ jobs: |
326 | 357 | - name: Debug output |
327 | 358 | run: ls -laR . |
328 | 359 |
|
329 | | - check-tokens: |
330 | | - name: Check the access tokens used for publishing |
331 | | - needs: [build-linux, build-macos, build-windows] |
332 | | - runs-on: ubuntu-latest |
333 | | - if: inputs.workflowDebug != true && inputs.packagingDebug != true && inputs.skipForumPublish != true |
334 | | - outputs: |
335 | | - publish-forum: ${{ steps.check-token-forum.token-set == 'true' }} |
336 | | - publish-github: ${{ steps.check-token-github.token-set == 'true' }} |
337 | | - steps: |
338 | | - - id: check-token-forum |
339 | | - name: Check the token used for publishing releases on the forum |
340 | | - env: |
341 | | - INTERSECTBOT_FORUM_TOKEN: ${{ secrets.INTERSECTBOT_FORUM_TOKEN }} |
342 | | - if: ${{ env.INTERSECTBOT_FORUM_TOKEN != '' }} |
343 | | - run: echo "token-set=true" >> "$GITHUB_OUTPUT" |
344 | | - - id: check-token-github |
345 | | - name: Check the token used for publishing GitHub releases |
346 | | - env: |
347 | | - INTERSECTBOT_ACCESS_TOKEN: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }} |
348 | | - if: ${{ env.INTERSECTBOT_ACCESS_TOKEN != '' }} |
349 | | - run: echo "token-set=true" >> "$GITHUB_OUTPUT" |
350 | | - |
351 | | - debug-check-tokens: |
352 | | - name: Debug state of check-tokens |
353 | | - needs: [check-tokens] |
354 | | - runs-on: ubuntu-latest |
355 | | - steps: |
356 | | - - id: dump |
357 | | - name: Dump check-tokens output |
358 | | - env: |
359 | | - PUBLISH_FORUM: needs.check-tokens.outputs.publish-forum |
360 | | - PUBLISH_GITHUB: needs.check-tokens.outputs.publish-github |
361 | | - run: | |
362 | | - echo "PUBLISH_FORUM='$PUBLISH_FORUM'" |
363 | | - echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'" |
364 | | -
|
365 | 360 | publish-github: |
366 | 361 | name: Publish GitHub Release |
367 | | - needs: [check-tokens] |
| 362 | + needs: [build-linux, build-macos, build-windows, check-tokens] |
368 | 363 | runs-on: ubuntu-latest |
369 | 364 | if: inputs.workflowDebug != true && needs.check-tokens.outputs.publish-github == 'true' |
370 | 365 | steps: |
|
0 commit comments