mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-04 06:03:10 +03:00
d91d58cbec
This way we can tag docker image with a matching NPM version.
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: "publish 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'
|
|
- run: npm i -g npm@7
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npx playwright install-deps
|
|
- 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'
|
|
- run: npm i -g npm@7
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npx playwright install-deps
|
|
- 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 }}
|
|
|
|
trigger-docker-build:
|
|
name: "publish to DockerHub"
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'microsoft/playwright'
|
|
steps:
|
|
- 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
|