run daily

This commit is contained in:
Alexander Wang 2025-03-20 22:01:56 -06:00
parent c946055511
commit 36df3344a3
No known key found for this signature in database
GPG key ID: BE3937D0D52D8927

View file

@ -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 }}