From cb87a55680f162a641a3b00b0677145cadfa8068 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Fri, 19 Feb 2021 11:36:50 +0800 Subject: [PATCH] ci: set publish step --- .github/workflows/changsets.yml | 18 +++++++----------- package.json | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/changsets.yml b/.github/workflows/changsets.yml index d20e971..97b14bf 100644 --- a/.github/workflows/changsets.yml +++ b/.github/workflows/changsets.yml @@ -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 }} diff --git a/package.json b/package.json index 7914938..74cef55 100644 --- a/package.json +++ b/package.json @@ -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",