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"
|
2021-04-05 22:39:15 +03:00
|
|
|
runs-on: ubuntu-20.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
|
2021-04-05 22:39:15 +03:00
|
|
|
- uses: actions/setup-node@v2
|
2020-04-22 01:10:00 +03:00
|
|
|
with:
|
2021-04-30 17:49:10 +03:00
|
|
|
node-version: 12
|
2020-04-22 01:10:00 +03:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2021-10-11 17:52:17 +03:00
|
|
|
- run: npm i -g npm@7
|
2020-04-22 01:10:00 +03:00
|
|
|
- run: npm ci
|
2020-07-02 01:22:29 +03:00
|
|
|
- run: npm run build
|
2021-10-11 17:52:17 +03:00
|
|
|
- run: npx playwright install-deps
|
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
|
2021-04-05 22:39:15 +03:00
|
|
|
- uses: actions/setup-node@v2
|
2021-01-14 04:01:46 +03:00
|
|
|
with:
|
2021-04-30 17:49:10 +03:00
|
|
|
node-version: 12
|
2021-01-14 04:01:46 +03:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2021-10-11 17:52:17 +03:00
|
|
|
- run: npm i -g npm@7
|
2021-01-14 04:01:46 +03:00
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
2021-10-11 17:52:17 +03:00
|
|
|
- run: npx playwright install-deps
|
2021-01-14 04:01:46 +03:00
|
|
|
- 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 }}
|
|
|
|
|
2021-10-08 00:42:44 +03:00
|
|
|
trigger-docker-build:
|
2020-07-14 03:15:10 +03:00
|
|
|
name: "publish to DockerHub"
|
2020-09-02 21:46:24 +03:00
|
|
|
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:
|
2021-10-08 00:42:44 +03:00
|
|
|
- run: |
|
|
|
|
curl -X POST \
|
|
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
|
|
-H "Authorization: token ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}" \
|
|
|
|
--data "{\"event_type\": \"build_docker_production\", \"client_payload\": {\"ref\": \"${{ github.sha }}\"}}" \
|
|
|
|
https://api.github.com/repos/microsoft/playwright-internal/dispatches
|