Skip to content

Commit b414144

Browse files
author
Íñigo Marquínez
authored
Merge pull request #12 from guidesmiths/publish-action
Added github action that publishes to npm
2 parents be3e9f5 + 8bab711 commit b414144

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Main changes
2+
3+
- :bug: (fix)
4+
- :new: (feat)
5+
- :wrench: (chore)
6+
- :cloud: (ci)
7+
- :memo: (docs)
8+
- :art: (style)
9+
- :arrows_counterclockwise: (refactor)
10+
- :chart_with_upwards_trend: (perf)
11+
- :microscope: (test)
12+
- :bangbang: (breaking change)
13+
14+
### Additional notes
15+
16+
(optional)
17+
18+
### Context
19+
20+
- :ticket: Closes / Relates _ticket number_

.github/workflows/npm-publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will publish a package to npm when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Publish package to npm public registry
5+
6+
on:
7+
release:
8+
types: [ published ]
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check-out the repository
15+
uses: actions/checkout@v2
16+
- name: Setup node version 16.13.0 (LTS)
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '16.13.0'
20+
registry-url: 'https://registry.npmjs.org'
21+
- name: Install production dependencies
22+
run: npm ci --production
23+
- name: Publish package to npm
24+
run: npm publish --ignore-scripts --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_GUIDESMITHS }}
27+

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16

0 commit comments

Comments
 (0)