Skip to content

Should Publish Dev #20078

Should Publish Dev

Should Publish Dev #20078

name: Should Publish Dev
on:
push:
branches:
- dev
schedule:
- cron: "0 * * * *"
jobs:
should-publish:
runs-on: ubuntu-latest
outputs:
check: ${{ steps.check.outputs.should-publish }}
steps:
- uses: actions/checkout@v3
- id: check
name: Check If Publish Is Needed
run: |
if ! node scripts/should-publish; then
echo "should-publish=false" >> "$GITHUB_OUTPUT"
else
echo "should-publish=true" >> "$GITHUB_OUTPUT"
fi
publish:
needs: [should-publish]
if: needs.should-publish.outputs.check == 'true'
uses: ./.github/workflows/dev-publish.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}