|
33 | 33 | - name: Grant execute permission for gradlew |
34 | 34 | run: chmod +x gradlew |
35 | 35 |
|
| 36 | + - name: Check for changes since last nightly |
| 37 | + if: github.event_name == 'schedule' |
| 38 | + id: changes_check |
| 39 | + run: | |
| 40 | + # Get the date from yesterday |
| 41 | + YESTERDAY=$(date -d 'yesterday' +%Y-%m-%d) |
| 42 | + echo "Checking for changes since: $YESTERDAY" |
| 43 | +
|
| 44 | + # Get the last nightly build commit hash (you might want to store this in a file or use a tag) |
| 45 | + # For now, we'll check if there are any commits in the last 24 hours |
| 46 | + COMMIT_COUNT=$(git log --since="$YESTERDAY" --oneline | wc -l) |
| 47 | +
|
| 48 | + if [ "$COMMIT_COUNT" -gt 0 ]; then |
| 49 | + echo "✅ Found $COMMIT_COUNT commits since $YESTERDAY - proceeding with nightly build" |
| 50 | + echo "has_changes=true" >> $GITHUB_OUTPUT |
| 51 | + else |
| 52 | + echo "ℹ️ No commits since $YESTERDAY - skipping nightly build" |
| 53 | + echo "has_changes=false" >> $GITHUB_OUTPUT |
| 54 | + fi |
| 55 | +
|
36 | 56 | - name: Determine version and channel |
37 | 57 | id: version_info |
38 | 58 | run: | |
|
74 | 94 | echo "CHANNEL=$CHANNEL" >> $GITHUB_OUTPUT |
75 | 95 | echo "Publishing version $VERSION to $CHANNEL channel" |
76 | 96 |
|
77 | | - - name: Check for changes since last nightly |
78 | | - if: github.event_name == 'schedule' |
79 | | - id: changes_check |
80 | | - run: | |
81 | | - # Get the date from yesterday |
82 | | - YESTERDAY=$(date -d 'yesterday' +%Y-%m-%d) |
83 | | - echo "Checking for changes since: $YESTERDAY" |
84 | | - |
85 | | - # Get the last nightly build commit hash (you might want to store this in a file or use a tag) |
86 | | - # For now, we'll check if there are any commits in the last 24 hours |
87 | | - COMMIT_COUNT=$(git log --since="$YESTERDAY" --oneline | wc -l) |
88 | | - |
89 | | - if [ "$COMMIT_COUNT" -gt 0 ]; then |
90 | | - echo "✅ Found $COMMIT_COUNT commits since $YESTERDAY - proceeding with nightly build" |
91 | | - echo "has_changes=true" >> $GITHUB_OUTPUT |
92 | | - else |
93 | | - echo "ℹ️ No commits since $YESTERDAY - skipping nightly build" |
94 | | - echo "has_changes=false" >> $GITHUB_OUTPUT |
95 | | - fi |
96 | | - |
97 | 97 | - name: Build nightly version |
98 | 98 | if: (github.event_name == 'schedule' && steps.changes_check.outputs.has_changes == 'true') || github.event_name == 'workflow_dispatch' |
99 | 99 | run: | |
|
0 commit comments