Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: publish stable release on tag push instead of release event (#41425)

Dmitry Gozmane4a50ba06d49
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml
index 07eb51e35d..bfd4d6d5fa 100644
--- a/.github/workflows/publish_release.yml
+++ b/.github/workflows/publish_release.yml
@@ -7,8 +7,10 @@ on:
push:
branches:
- release-*
- release:
- types: [published]
+ tags:
+ # TODO: revert this to "published release" once github.ref is set there.
+ # See https://github.com/actions/runner/issues/2788 as well.
+ - 'v1.61.1'
jobs:
publish-npm-and-driver:
@@ -47,7 +49,7 @@ jobs:
node utils/build/update_canary_version.js --beta --commit-timestamp
utils/publish_all_packages.sh --beta
- name: "publish release to NPM"
- if: github.event_name == 'release' && github.event.action == 'published'
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: utils/publish_all_packages.sh --release
- name: Azure Login
@@ -58,7 +60,7 @@ jobs:
subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }}
- name: build & publish driver
env:
- AZ_UPLOAD_FOLDER: ${{ github.event_name == 'release' && 'driver' || 'driver/next' }}
+ AZ_UPLOAD_FOLDER: ${{ startsWith(github.ref, 'refs/tags/v') && 'driver' || 'driver/next' }}
run: |
utils/build/build-playwright-driver.sh
utils/build/upload-playwright-driver.sh
@@ -89,7 +91,7 @@ jobs:
env:
GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Deploy Stable
- if: github.event_name == 'release' && github.event.action == 'published'
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: bash utils/build/deploy-trace-viewer.sh --stable
env:
GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }}