Auto Publish to NPM #30163
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Publish to NPM | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
repository_dispatch: | |
types: [auto-publish] | |
workflow_dispatch: # for manual testing | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
# setup | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
# do the job | |
- name: Auto Publish to NPM | |
run: npm run auto-publish | |
env: | |
GH_AUTH_TOKEN: ${{ secrets.GH_AUTH_TOKEN }} | |
NPM_PUBLISH_AUTOMATION_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }} |