ci: trigger release_cli / release_napi only when package.json changes

This commit is contained in:
Boshen 2023-04-22 23:20:35 +08:00
parent cecd743848
commit 97189c4e4c
No known key found for this signature in database
GPG key ID: 9C7A8C8AB22BEBD1
2 changed files with 14 additions and 8 deletions

View file

@ -1,14 +1,16 @@
# Code copied from [rome](https://github.com/rome/tools/blob/main/.github/workflows/release_cli.yml)
name: Release CLI
# When main is pushed and npm/oxc/package.json has been changed,
# trigger the jobs after the ci workflow has been passed.
on:
workflow_run:
workflows: [ci]
types: [completed]
push:
branches:
- main
paths:
- npm/oxc/package.json
workflow_run:
workflows: [ci]
types: [completed]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

View file

@ -1,12 +1,16 @@
name: Release NAPI
# When main is pushed and npm/napi/package.json has been changed,
# trigger the jobs after the ci workflow has been passed.
on:
workflow_run:
workflows: [ci]
types: [completed]
push:
branches:
- main
paths:
- npm/napi/package.json
workflow_run:
workflows: [ci]
types: [completed]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}