-
Notifications
You must be signed in to change notification settings - Fork 29
35 lines (31 loc) · 1.56 KB
/
dispatch-new-version-event.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Dispatch new version event
on:
push:
branches:
- master
jobs:
dispatch-new-version-event:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Dispatch new version event
run: |
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
git checkout HEAD~1
PREVIOUS_VERSION=$(node -p -e "require('./package.json').version")
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
curl -X POST https://api.github.com/repos/webex/components/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.ACCESS_TOKEN }} \
--data '{"event_type": "component-adapter-interfaces:version-changed", "client_payload": { "version": "'"${CURRENT_VERSION}"'"}'
curl -X POST https://api.github.com/repos/webex/sdk-component-adapter/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.ACCESS_TOKEN }} \
--data '{"event_type": "component-adapter-interfaces:version-changed", "client_payload": { "version": "'"${CURRENT_VERSION}"'"}'
curl -X POST https://api.github.com/repos/webex/widgets/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.ACCESS_TOKEN }} \
--data '{"event_type": "component-adapter-interfaces:version-changed", "client_payload": { "version": "'"${CURRENT_VERSION}"'"}'
fi