Skip to content

Commit a51131c

Browse files
committed
Publish on npm.
1 parent 2868728 commit a51131c

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,23 @@ jobs:
4545
with:
4646
github_token: ${{ secrets.GITHUB_TOKEN }}
4747
publish_dir: .
48+
49+
npm:
50+
needs: test
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/download-artifact@v2
54+
with:
55+
name: build
56+
- uses: actions/setup-node@v1
57+
with:
58+
node-version: 14.x
59+
- name: Append commit hash to package version
60+
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA}/" package.json'
61+
- name: Disable pre- and post-publish actions
62+
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
63+
- uses: rlespinasse/github-slug-action@v3.x
64+
- uses: JS-DevTools/npm-publish@v1
65+
with:
66+
token: ${{ secrets.NPM_TOKEN }}
67+
tag: ${{ env.GITHUB_REF_SLUG }}

travis/bumpversion.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)