Skip to content

Commit

Permalink
Add notify workflow (#165)
Browse files Browse the repository at this point in the history
This adds a github workflow dispatch event to tell the registry API to update.
  • Loading branch information
codebycarson authored May 7, 2024
1 parent 5351374 commit fdfbffd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# runs if /packages/registry/** is updated and the release workflow completes successfully
name: Release Package

on:
workflow_run:
workflows: ["Release"]
types:
- completed
push:
paths:
- 'packages/registry/**'

jobs:
release:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Delay for 90 seconds to allow NPM package to propagate
run: sleep 90

- name: Update registry API
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: workflow_completed
client-payload: '{"workflow_run_id": "${{ github.event.workflow_run.id }}"}'
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"build:all": "nx run-many --target=build",
"build:since": "nx affected --target=build",
"prebuild": "yarn build:since",
"postinstall": "git submodule update --init --recursive",
"postinstall": "yarn update-submodules",
"update-submodules": "git submodule update --init --recursive",
"docs": "npx typedoc",
"lint:all": "nx run-many --target=lint",
"lint:since": "nx affected --target=lint",
Expand Down

0 comments on commit fdfbffd

Please sign in to comment.