mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
76 lines
2.7 KiB
YAML
76 lines
2.7 KiB
YAML
name: "release"
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish-npm-release:
|
|
name: "publish to NPM"
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'microsoft/playwright'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: utils/publish_all_packages.sh --release
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
publish-driver-release:
|
|
name: "publish playwright driver to CDN"
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'microsoft/playwright'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: utils/build/build-playwright-driver.sh
|
|
- run: utils/build/upload-playwright-driver.sh
|
|
env:
|
|
AZ_UPLOAD_FOLDER: driver
|
|
AZ_ACCOUNT_KEY: ${{ secrets.AZ_ACCOUNT_KEY }}
|
|
AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }}
|
|
|
|
publish-docker-release:
|
|
name: "publish to DockerHub"
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'microsoft/playwright'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: azure/docker-login@v1
|
|
with:
|
|
login-server: playwright.azurecr.io
|
|
username: playwright
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 12
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
|
|
- run: ./utils/docker/build.sh focal playwright:localbuild-focal
|
|
- name: tag & publish
|
|
run: |
|
|
# GITHUB_REF has a form of `refs/tags/v1.3.0`.
|
|
# TAG_NAME would be `v1.3.0`
|
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:bionic
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}-bionic
|
|
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:latest
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:focal
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:${TAG_NAME}
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:${TAG_NAME}-focal
|