diff --git a/.github/workflows/publish-marketplace.yml b/.github/workflows/publish-marketplace.yml index 3bc1e994..b4c2441e 100644 --- a/.github/workflows/publish-marketplace.yml +++ b/.github/workflows/publish-marketplace.yml @@ -74,18 +74,18 @@ jobs: echo "CHANNEL=$CHANNEL" >> $GITHUB_OUTPUT echo "Publishing version $VERSION to $CHANNEL channel" - - name: Check for changes since last nightly + - name: Check for changes since last nightly if: github.event_name == 'schedule' id: changes_check run: | # Get the date from yesterday YESTERDAY=$(date -d 'yesterday' +%Y-%m-%d) echo "Checking for changes since: $YESTERDAY" - + # Get the last nightly build commit hash (you might want to store this in a file or use a tag) # For now, we'll check if there are any commits in the last 24 hours COMMIT_COUNT=$(git log --since="$YESTERDAY" --oneline | wc -l) - + if [ "$COMMIT_COUNT" -gt 0 ]; then echo "✅ Found $COMMIT_COUNT commits since $YESTERDAY - proceeding with nightly build" echo "has_changes=true" >> $GITHUB_OUTPUT @@ -95,7 +95,7 @@ jobs: fi - name: Build nightly version - if: github.event_name == 'schedule' && steps.changes_check.outputs.has_changes == 'true' + if: (github.event_name == 'schedule' && steps.changes_check.outputs.has_changes == 'true') || github.event_name == 'workflow_dispatch' run: | echo "Building nightly version from source..." ./gradlew buildPlugin -Pgpr.username=${{ github.actor }} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}