playwright/.github/workflows/publish_release.yml
Andrey Lushnikov 0b7f789de4
devops: try using another Github Actions event to trigger releases (#1931)
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.
2020-04-22 22:52:32 -07:00

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 }}