-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (31 loc) · 944 Bytes
/
Copy pathpublish.yml
File metadata and controls
35 lines (31 loc) · 944 Bytes
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
name: Publish NPM
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14.16.1'
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- run: yarn remove element-ui vue -D
- run: yarn add element-ui vue -P
- name: Get Version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- run: npm version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
- name: Publish Package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm publish --access public
# - name: Get version
# id: get_version
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
# - run: echo ${{ steps.get_version.outputs.VERSION }}