Skip to content

NPM Publish Cron

NPM Publish Cron #311

name: NPM Publish Cron
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
release-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run release -- --ci -i patch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}