Skip to content

Publish Npm Downloads 🚀 #218

Publish Npm Downloads 🚀

Publish Npm Downloads 🚀 #218

Workflow file for this run

name: Publish Npm Downloads 🚀
on:
workflow_dispatch:
schedule:
# - cron: '0 0 */3 * *' # Runs at 00:00 UTC every 3 days
# - cron: '0 0 * * *' # Runs at 00:00 UTC every day
- cron: '0 19 * * *' # Runs at 19:00 UTC every day
jobs:
publish-npm-downloads:
runs-on: ubuntu-latest
steps:
- name: Check out current commit
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.9.0
registry-url: https://registry.npmjs.org/
- name: Install and Build
run: |
yarn
yarn dev
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Cosmology"
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit
if: steps.verify_diff.outputs.changed == 'true'
run: |
git add .
git commit -m "update 🛠"
git status
- name: Push
if: steps.verify_diff.outputs.changed == 'true'
run: git push
env:
GH_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}