1
- name : Nightly Development Build and Release
1
+ name : Nightly ( Development) Build and Release
2
2
# Controls when the action will run.
3
3
on :
4
4
workflow_dispatch :
@@ -19,33 +19,47 @@ jobs:
19
19
runs-on : ubuntu-latest
20
20
21
21
outputs :
22
- needs_build : ${{ steps.check_build .outputs.needs_build }}
22
+ needs_build : ${{ steps.check_manual_run.outputs.needs_build || steps.check_tags .outputs.needs_build }}
23
23
24
24
steps :
25
+
26
+ - name : Check if workflow was manually triggered
27
+ id : check_manual_run
28
+ run : |
29
+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
30
+ echo "Workflow dispatched manually. Continuing..."
31
+ echo "needs_build=true" >> $GITHUB_OUTPUT;
32
+ else
33
+ echo "Workflow triggered by a scheduled run. Continuing..."
34
+ echo "needs_build=false" >> $GITHUB_OUTPUT;
35
+ fi
36
+
25
37
- name : Checkout code
38
+ if : !steps.check_manual_run.outputs.needs_build
26
39
uses : actions/checkout@v3
27
40
28
41
- name : fetch tags
42
+ if : !steps.check_manual_run.outputs.needs_build
29
43
run : git fetch --tags origin
30
44
31
45
- name : Check if tags point to the same commit or if the workflow was manually triggered
32
- id : check_build
46
+ if : !steps.check_manual_run.outputs.needs_build
47
+ id : check_tags
33
48
run : |
34
- if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
35
- echo "Workflow dispatched manually. Continuing..."
49
+ curr_sha=$(git rev-parse HEAD)
50
+ prev_sha=$(git rev-parse ${{ env.PREV_TAG }} 2>/dev/null)
51
+
52
+ if [[ $? -ne 0 ]]; then
53
+ echo "Tag ${{ env.PREV_TAG }} cannot be resolved. Continuing..."
36
54
echo "needs_build=true" >> $GITHUB_OUTPUT;
55
+ elif [[ "$curr_sha" == "$prev_sha" ]]; then
56
+ echo "No changes since last nightly release. Exiting..."
57
+ echo "needs_build=false" >> $GITHUB_OUTPUT;
37
58
else
38
- curr_sha=$(git rev-parse HEAD)
39
- prev_sha=$(git rev-parse ${{ env.PREV_TAG }})
40
-
41
- if [[ "$curr_sha" == "$prev_sha" ]]; then
42
- echo "No changes since last nightly release. Exiting..."
43
- echo "needs_build=false" >> $GITHUB_OUTPUT;
44
- else
45
- echo "Changes since last nightly release detected. Continuing..."
46
- echo "needs_build=true" >> $GITHUB_OUTPUT;
47
- fi
59
+ echo "Changes since last nightly release detected. Continuing..."
60
+ echo "needs_build=true" >> $GITHUB_OUTPUT;
48
61
fi
62
+
49
63
50
64
build-meson-releases :
51
65
name : Linux & macOS Release Builds
0 commit comments