mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
devops: update publish script to work for @next (#5072)
This commit is contained in:
parent
5bb20fb820
commit
0d0a6e8f82
2
.github/workflows/publish_canary_npm.yml
vendored
2
.github/workflows/publish_canary_npm.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
- uses: microsoft/playwright-github-action@v1
|
- uses: microsoft/playwright-github-action@v1
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: node utils/build/update_canary_version.js
|
# publish_all_packages.sh updates the version automatically
|
||||||
- run: utils/publish_all_packages.sh --tip-of-tree
|
- run: utils/publish_all_packages.sh --tip-of-tree
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
@ -41,14 +41,18 @@ fi
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
NPM_PUBLISH_TAG="next"
|
|
||||||
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
|
||||||
|
|
||||||
if [[ -n $(git status -s) ]]; then
|
if [[ -n $(git status -s) ]]; then
|
||||||
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
echo "ERROR: git status is dirty; some uncommitted changes or untracked files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
NPM_PUBLISH_TAG="next"
|
||||||
|
|
||||||
|
if [[ $1 == "--tip-of-tree" ]]; then
|
||||||
|
node utils/build/update_canary_version.js
|
||||||
|
fi
|
||||||
|
VERSION=$(node -e 'console.log(require("./package.json").version)')
|
||||||
|
|
||||||
if [[ $1 == "--release" ]]; then
|
if [[ $1 == "--release" ]]; then
|
||||||
# Ensure package version does not contain dash.
|
# Ensure package version does not contain dash.
|
||||||
if [[ "${VERSION}" == *-* ]]; then
|
if [[ "${VERSION}" == *-* ]]; then
|
||||||
@ -76,6 +80,8 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "==================== Building version ${VERSION} ================"
|
||||||
|
|
||||||
PLAYWRIGHT_TGZ="$PWD/playwright.tgz"
|
PLAYWRIGHT_TGZ="$PWD/playwright.tgz"
|
||||||
PLAYWRIGHT_CORE_TGZ="$PWD/playwright-core.tgz"
|
PLAYWRIGHT_CORE_TGZ="$PWD/playwright-core.tgz"
|
||||||
PLAYWRIGHT_WEBKIT_TGZ="$PWD/playwright-webkit.tgz"
|
PLAYWRIGHT_WEBKIT_TGZ="$PWD/playwright-webkit.tgz"
|
||||||
@ -87,6 +93,8 @@ node ./packages/build_package.js playwright-webkit "${PLAYWRIGHT_WEBKIT_TGZ}"
|
|||||||
node ./packages/build_package.js playwright-firefox "${PLAYWRIGHT_FIREFOX_TGZ}"
|
node ./packages/build_package.js playwright-firefox "${PLAYWRIGHT_FIREFOX_TGZ}"
|
||||||
node ./packages/build_package.js playwright-chromium "${PLAYWRIGHT_CHROMIUM_TGZ}"
|
node ./packages/build_package.js playwright-chromium "${PLAYWRIGHT_CHROMIUM_TGZ}"
|
||||||
|
|
||||||
|
echo "==================== Publishing version ${VERSION} ================"
|
||||||
|
|
||||||
npm publish ${PLAYWRIGHT_TGZ} --tag="${NPM_PUBLISH_TAG}"
|
npm publish ${PLAYWRIGHT_TGZ} --tag="${NPM_PUBLISH_TAG}"
|
||||||
npm publish ${PLAYWRIGHT_CORE_TGZ} --tag="${NPM_PUBLISH_TAG}"
|
npm publish ${PLAYWRIGHT_CORE_TGZ} --tag="${NPM_PUBLISH_TAG}"
|
||||||
npm publish ${PLAYWRIGHT_WEBKIT_TGZ} --tag="${NPM_PUBLISH_TAG}"
|
npm publish ${PLAYWRIGHT_WEBKIT_TGZ} --tag="${NPM_PUBLISH_TAG}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user