Bundle bin and cli separately (#12306)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-03-13 22:47:02 +08:00
1 parent 9f6c005b28
commit 5a50a0d909
8 files changed
+66 -39

No files matched your search

+25
View File
@@ -144,3 +144,28 @@ jobs:
env:
NODE_ENV: production
PRETTIER_FALLBACK_RESOLVE: true
cli:
name: CLI
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Setup Node.js
uses: actions/setup-node@v2.5.1
with:
node-version: "0.10.48"
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Validate Node.js Version
run: node -v | grep "v0.10.48" || exit 1
- name: Run CLI on Node.js v0.10.48
run: node dist/bin-prettier --version 2>&1 >/dev/null | grep "prettier requires at least version 10.13.0 of Node, please upgrade" || exit 1