-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (48 loc) · 1.6 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: deploy package to npm
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: pull tags
run: git pull --tags
- name: Build
run: npm install && npm run build
# - name: Deploy API
# run: vercel --prod --token $VERCEL_TOKEN
# env:
# VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
# VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG }}
# VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJ }}
- name: Version
uses: "phips28/gh-action-bump-version@master"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Publish
run: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc && npm publish --access public
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# publish-gpr:
# needs: deploy
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# registry-url: https://npm.pkg.github.com/
# - run: npm install && npm run test
# - run: npm adduser && npm whoami && npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}}