ci: set publish step

This commit is contained in:
Rongjian Zhang 2021-02-19 11:36:50 +08:00
parent fd7dc5fe7c
commit cb87a55680
2 changed files with 8 additions and 11 deletions

View File

@ -7,22 +7,18 @@ env:
CI: true
jobs:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- name: install pnpm
run: npm i pnpm@latest -g
- name: install dependencies
run: pnpm install
- name: create versions
uses: changesets/action@master
- run: npm i pnpm@latest -g && pnpm install
- uses: changesets/action@master
with:
publish: npm run build:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -4,6 +4,7 @@
"scripts": {
"clean": "rm -rf packages/*/{lib,dist,tsconfig.tsbuildinfo}",
"build": "tsc --build && node -r esm scripts/process.js && rollup -c",
"build:ci": "UMD=1 npm run build",
"dev": "run-p dev:bundle dev:tsc dev:process",
"dev:bundle": "rollup -cw",
"dev:tsc": "tsc --build --watch",