-
-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (30 loc) · 868 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
name: publish
on:
push:
branches: master
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Authenticate github cli
uses: actions/checkout@v2
- name: Identify github user
run: |
git config --global user.email "tin@devtin.io"
git config --global user.name "Martin Rafael Gonzalez"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: install dependencies
run: |
npm ci
- name: publish package to npm registry
run: |
npm publish --access public && git tag v$(node -p -e "require('./package.json').version")
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}