-
Notifications
You must be signed in to change notification settings - Fork 24
47 lines (45 loc) · 1.05 KB
/
npmpublish.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Publish to NPM
on:
workflow_dispatch: {}
push:
branches:
- master
paths:
- 'api/*.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
version:
needs: build
runs-on: ubuntu-latest
steps:
- name: 'checkout'
uses: actions/checkout@v1
- name: 'update version and add tag'
uses: adasq/dropbox-v2-api-watcher@prepublish
with:
myInput: ${{ github.event.action }}
env:
TOKEN: ${{ secrets.token }}
OWNER: 'adasq'
REPO: 'dropbox-v2-api'
publish-npm:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}