-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (40 loc) · 1 KB
/
publish-data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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