From b3303cff433758ffaeaaf3fb889ed724e5facb4b Mon Sep 17 00:00:00 2001 From: Prev Wong Date: Sun, 23 May 2021 19:41:38 +0800 Subject: [PATCH] chore: update publish script --- .github/workflows/release.yml | 4 ++-- package.json | 9 +++------ scripts/{release.sh => publish.sh} | 8 ++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) rename scripts/{release.sh => publish.sh} (95%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 056cb944a..898fccc92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,5 +19,5 @@ jobs: with: node-version: 10.x - - run: yarn install --immutable - - run: yarn release + - run: yarn install + - run: yarn publish diff --git a/package.json b/package.json index a8da1689c..220e41e29 100644 --- a/package.json +++ b/package.json @@ -12,17 +12,14 @@ "build:all": "lerna run build --stream", "deploy": "cross-env ENV=production ./scripts/deploy.sh", "prettier": "prettier --write .", - "release": "run-s clean build test release:npm", - "release:npm": "./scripts/release.sh", - "publish:beta": "lerna version prerelease --preid beta --force-publish --yes", "cy:test": "cypress run", "cy:open": "cypress open", "test": "jest", "test:watch": "cross-env NODE_ENV=test jest --watchAll", "lint": "eslint . --ext .js,.jsx,.ts,.tsx", - "lerna:version": "lerna version --conventional-commits --yes", - "lerna:prerelease": "yarn lerna:version --conventional-prerelease --yes", - "lerna:publish": "lerna publish from-git --yes" + "prerelease": "lerna version --yes --conventional-commits --conventional-prerelease", + "release": "lerna version --yes --conventional-commits --conventional-graduate", + "publish": "./scripts/publish.sh" }, "devDependencies": { "@babel/cli": "^7.7.4", diff --git a/scripts/release.sh b/scripts/publish.sh similarity index 95% rename from scripts/release.sh rename to scripts/publish.sh index 86e662330..55f41b965 100755 --- a/scripts/release.sh +++ b/scripts/publish.sh @@ -2,6 +2,14 @@ # https://github.com/vercel/next.js/blob/canary/publish-release.sh +set -e + +yarn clean + +yarn build + +yarn test + git describe --exact-match if [[ ! $? -eq 0 ]];then