Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: support release candidate publishing (#10360)
Andrey Lushnikov6904d6c7e6f0
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.ymlindex 3feab744f8..065fc6f2f4 100644--- a/.github/workflows/publish_release.yml+++ b/.github/workflows/publish_release.yml@@ -19,7 +19,12 @@ jobs:- run: npm ci- run: npm run build- run: npx playwright install-deps+ - run: utils/publish_all_packages.sh --release-candidate+ if: "github.event.release.prerelease"+ env:+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}- run: utils/publish_all_packages.sh --release+ if: "!github.event.release.prerelease"env:NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}@@ -74,5 +79,5 @@ jobs:- run: npm i -g npm@7- name: Deploy Stablerun: bash utils/build/deploy-trace-viewer.sh --stable- env:+ env:GH_SERVICE_ACCOUNT_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}diff --git a/utils/publish_all_packages.sh b/utils/publish_all_packages.shindex 54b6e2e4ba..459df1c847 100755--- a/utils/publish_all_packages.sh+++ b/utils/publish_all_packages.sh@@ -46,7 +46,7 @@ NPM_PUBLISH_TAG="next"VERSION=$(node -e 'console.log(require("./package.json").version)')-if [[ $1 == "--release" ]]; then+if [[ "$1" == "--release" ]]; thenif [[ -n $(git status -s) ]]; thenecho "ERROR: git status is dirty; some uncommitted changes or untracked files"exit 1@@ -57,7 +57,18 @@ if [[ $1 == "--release" ]]; thenexit 1fiNPM_PUBLISH_TAG="latest"-elif [[ $1 == "--next" ]]; then+elif [[ "$1" == "--release-candidate" ]]; then+ if [[ -n $(git status -s) ]]; then+ echo "ERROR: git status is dirty; some uncommitted changes or untracked files"+ exit 1+ fi+ # Ensure package version is properly formatted.+ if [[ "${VERSION}" != *-rc* ]]; then+ echo "ERROR: release candidate version must have a dash"+ exit 1+ fi+ NPM_PUBLISH_TAG="rc"+elif [[ "$1" == "--next" ]]; then# Ensure package version contains dash.if [[ "${VERSION}" != *-* ]]; thenecho "ERROR: cannot publish release version with --next flag"@@ -65,7 +76,7 @@ elif [[ $1 == "--next" ]]; thenfiNPM_PUBLISH_TAG="next"-elif [[ $1 == "--beta" ]]; then+elif [[ "$1" == "--beta" ]]; then# Ensure package version contains dash.if [[ "${VERSION}" != *-* ]]; thenecho "ERROR: cannot publish release version with --beta flag"