Skip to content

Commit 55e85cb

Browse files
authored
Merge pull request #62 from ilyamerman/github-action-npm-publish
github action: npm publish (on version change)
2 parents e1cb08f + 65088ff commit 55e85cb

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Publish to NPM
12+
id: publish
13+
uses: JS-DevTools/npm-publish@v1
14+
with:
15+
token: ${{ secrets.NPM_TOKEN }}
16+
- name: Create Tag & Release
17+
if: steps.publish.outputs.type != 'none'
18+
id: create_release
19+
uses: actions/create-release@v1
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
tag_name: ${{ steps.publish.outputs.version }}
24+
release_name: Release ${{ steps.publish.outputs.version }}
25+
body: ${{ steps.publish.outputs.version }}
26+
draft: false
27+
prerelease: false

0 commit comments

Comments
 (0)