2020-04-22 01:10:00 +03:00
|
|
|
name: "release"
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
2020-04-23 08:52:32 +03:00
|
|
|
types: [published]
|
2020-04-22 01:10:00 +03:00
|
|
|
|
|
|
|
jobs:
|
2020-07-14 03:15:10 +03:00
|
|
|
publish-npm-release:
|
|
|
|
name: "publish to NPM"
|
2020-04-22 01:10:00 +03:00
|
|
|
runs-on: ubuntu-18.04
|
2020-08-01 00:09:36 +03:00
|
|
|
if: github.repository == 'microsoft/playwright'
|
2020-04-22 01:10:00 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 10
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2020-07-31 03:47:39 +03:00
|
|
|
- uses: microsoft/playwright-github-action@v1
|
2020-04-22 01:10:00 +03:00
|
|
|
- run: npm ci
|
2020-07-02 01:22:29 +03:00
|
|
|
- run: npm run build
|
2020-04-22 01:10:00 +03:00
|
|
|
- run: utils/publish_all_packages.sh --release
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2020-07-14 03:15:10 +03:00
|
|
|
|
2021-01-14 04:01:46 +03:00
|
|
|
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@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
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 }}
|
|
|
|
|
2020-07-14 03:15:10 +03:00
|
|
|
publish-docker-release:
|
|
|
|
name: "publish to DockerHub"
|
2020-09-02 21:46:24 +03:00
|
|
|
# We use `docker push --all-tags` to push all tags which is a newly addition to docker
|
|
|
|
runs-on: ubuntu-20.04
|
2020-08-01 00:09:36 +03:00
|
|
|
if: github.repository == 'microsoft/playwright'
|
2020-07-14 03:15:10 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-09-03 09:33:09 +03:00
|
|
|
- uses: azure/docker-login@v1
|
|
|
|
with:
|
|
|
|
login-server: playwright.azurecr.io
|
|
|
|
username: playwright
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- uses: microsoft/playwright-github-action@v1
|
2020-07-18 02:51:39 +03:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 10.15
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
2021-01-03 19:47:29 +03:00
|
|
|
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
|
|
|
|
- run: ./utils/docker/build.sh focal playwright:localbuild-focal
|
2020-09-03 09:33:09 +03:00
|
|
|
- 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/}
|
2021-01-03 19:47:29 +03:00
|
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:latest
|
|
|
|
./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}
|
|
|
|
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}-bionic
|
2020-09-24 01:10:43 +03:00
|
|
|
|
2021-01-03 19:47:29 +03:00
|
|
|
./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}-focal
|