From 36df3344a3b69d165752345d68a855c8247dafdb Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 20 Mar 2025 22:01:56 -0600 Subject: [PATCH] run daily --- .github/workflows/daily.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 1275cfb66..1e259799c 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -32,12 +32,25 @@ jobs: with: fetch-depth: 0 # Needed for git history and version tags + - name: Check for changes + id: check_changes + run: | + if [ $(git rev-list --count --since="24 hours ago" HEAD) -gt 0 ]; then + echo "has_changes=true" >> $GITHUB_OUTPUT + echo "Found changes in the last 24 hours, proceeding to publish d2js nightly" + else + echo "has_changes=false" >> $GITHUB_OUTPUT + echo "No changes in the last 24 hours, skipping d2js nightly publish" + fi + - uses: actions/setup-go@v4 + if: steps.check_changes.outputs.has_changes == 'true' with: go-version-file: ./go.mod cache: true - name: Publish nightly version to NPM + if: steps.check_changes.outputs.has_changes == 'true' run: COLOR=1 PUBLISH=1 ./make.sh js env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }}