mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
0b7f789de4
The [official documentation](https://help.github.com/en/actions/language-and-framework-guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry) suggests using `created` event, but it didn't work for us. As someone mentioned on [github community](https://github.community/t5/GitHub-Actions/Workflow-set-for-on-release-not-triggering-not-showing-up/m-p/53236#M8758), it looks like the `created` event is actually issued when release draft is first created. Try using [`published`](https://help.github.com/en/actions/reference/events-that-trigger-workflows#release-event-release) event instead.
26 lines
489 B
YAML
26 lines
489 B
YAML
name: "release"
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
env:
|
|
CI: true
|
|
|
|
jobs:
|
|
publish-canary:
|
|
name: "publish"
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm ci
|
|
- run: utils/publish_all_packages.sh --release
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|