Skip to content

Commit caae80e

Browse files
committed
📦 Chore: add github actions for publishing
1 parent 548812e commit caae80e

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: publish
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Clone repo
11+
uses: actions/checkout@v1
12+
- name: Setup node
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: '12.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- name: Install modules
18+
run: yarn
19+
- run: npm run build
20+
- run: npm publish --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/manually.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: manually-trigger
2+
on: workflow_dispatch
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Clone repo
8+
uses: actions/checkout@v1
9+
- name: Setup node
10+
uses: actions/setup-node@v1
11+
with:
12+
node-version: '12.x'
13+
registry-url: 'https://registry.npmjs.org'
14+
- name: Install modules
15+
run: yarn
16+
- run: npm run build
17+
- run: npm publish --access public
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)