Skip to content

Commit 606f69a

Browse files
authored
Create publish.yml
1 parent 8363b34 commit 606f69a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: publish
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
jobs:
8+
build:
9+
runs-on: Ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
node-version: [12.16.3]
14+
name: Node ${{ matrix.node-version }} sample
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Node ${{ matrix.nodeversion }}
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
registry-url: 'https://registry.npmjs.org'
22+
- name: Install dependencies
23+
run: npm install
24+
- name: Publish
25+
if: ${{ matrix.node-version == '12.16.3' }}
26+
run: npm publish
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)