-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 883 Bytes
/
publish.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
name: build & publish to npm
on:
schedule:
# 10th of the month, at 14:00
- cron: '0 14 10 * *'
jobs:
test-build-publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16']
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
- run: npm test
- name: npm login
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm set "//registry.npmjs.org/:_authToken=$NPM_TOKEN"
- name: bump version
run: |
set -x
npm version --no-git-tag-version --force "$(npm exec -- semver@7 -i minor "$(npm info "$(jq -r .name package.json)" version)")"
- name: publish
run: npm publish