Skip to content

Commit 90d4705

Browse files
committed
move check-tokens to start of build for faster debugging
1 parent 666e5a4 commit 90d4705

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,41 @@ env:
4242
VERSION_SUFFIX: -beta
4343

4444
jobs:
45+
check-tokens:
46+
name: Check the access tokens used for publishing
47+
runs-on: ubuntu-latest
48+
if: inputs.workflowDebug != true && inputs.packagingDebug != true && inputs.skipForumPublish != true
49+
outputs:
50+
publish-forum: ${{ steps.check-token-forum.token-set == 'true' }}
51+
publish-github: ${{ steps.check-token-github.token-set == 'true' }}
52+
steps:
53+
- id: check-token-forum
54+
name: Check the token used for publishing releases on the forum
55+
env:
56+
INTERSECTBOT_FORUM_TOKEN: ${{ secrets.INTERSECTBOT_FORUM_TOKEN }}
57+
if: ${{ env.INTERSECTBOT_FORUM_TOKEN != '' }}
58+
run: echo "token-set=true" >> "$GITHUB_OUTPUT"
59+
- id: check-token-github
60+
name: Check the token used for publishing GitHub releases
61+
env:
62+
INTERSECTBOT_ACCESS_TOKEN: ${{ secrets.INTERSECTBOT_ACCESS_TOKEN }}
63+
if: ${{ env.INTERSECTBOT_ACCESS_TOKEN != '' }}
64+
run: echo "token-set=true" >> "$GITHUB_OUTPUT"
65+
66+
debug-check-tokens:
67+
name: Debug state of check-tokens
68+
needs: [check-tokens]
69+
runs-on: ubuntu-latest
70+
steps:
71+
- id: dump
72+
name: Dump check-tokens output
73+
env:
74+
PUBLISH_FORUM: ${{ needs.check-tokens.outputs.publish-forum }}
75+
PUBLISH_GITHUB: ${{ needs.check-tokens.outputs.publish-github }}
76+
run: |
77+
echo "PUBLISH_FORUM='$PUBLISH_FORUM'"
78+
echo "PUBLISH_GITHUB='$PUBLISH_GITHUB'"
79+
4580
generate-keys:
4681
name: Generate Version-Specific Network Keys
4782
runs-on: ubuntu-latest
@@ -326,45 +361,9 @@ jobs:
326361
- name: Debug output
327362
run: ls -laR .
328363

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-
365364
publish-github:
366365
name: Publish GitHub Release
367-
needs: [check-tokens]
366+
needs: [build-linux, build-macos, build-windows, check-tokens]
368367
runs-on: ubuntu-latest
369368
if: inputs.workflowDebug != true && needs.check-tokens.outputs.publish-github == 'true'
370369
steps:

0 commit comments

Comments
 (0)