Skip to content

Commit

Permalink
Revert "changed newversion event for publish"
Browse files Browse the repository at this point in the history
This reverts commit 061fa05.
  • Loading branch information
jenithainbaraj committed Jan 6, 2023
1 parent 169795e commit ce26eaf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/dispatch-new-version-event.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Dispatch new version event

on:
push:
branches:
- master
jobs:
semantic-release:
name: semantic-latest
dispatch-new-version-event:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
with:
node-version: 16
- run: yarn install
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}"'"}'
- run: yarn build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
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
Binary file modified .yarn/install-state.gz
Binary file not shown.

0 comments on commit ce26eaf

Please sign in to comment.