Skip to content

Publish data to npm #13

Publish data to npm

Publish data to npm #13

Workflow file for this run

name: Publish data to npm
on:
schedule:
- cron: "0 0 * * MON"
push:
branches:
- master
paths:
- "packages/es-scraper/**"
workflow_dispatch: {}
jobs:
publish:
runs-on: ubuntu-latest
environment: Publish
defaults:
run:
working-directory: ./packages/es-scraper
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: yarn
- run: yarn install
- run: yarn build
- name: Publish to npm
run: |
npm whoami
yarn version patch
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push new version
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "chore: publish new version [skip ci]"
git push