Skip to content

Commit 52e3bb3

Browse files
authored
ci: Publish new version to npm when tagged (#2)
1 parent 4469bd4 commit 52e3bb3

File tree

4 files changed

+21
-14668
lines changed

4 files changed

+21
-14668
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Publish Version to NPM'
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-node@v1
14+
- id: version
15+
uses: battila7/get-version-action@v2
16+
- run: npm --no-git-tag-version version ${{ steps.version.outputs.version }}
17+
- uses: JS-DevTools/npm-publish@v1
18+
with:
19+
token: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/lib
22
/node_modules
3-
npm-debug.log*
3+
npm-debug.log*
4+
/package-lock.json

0 commit comments

Comments
 (0)