Skip to content

Commit

Permalink
changed newversion event for publish
Browse files Browse the repository at this point in the history
  • Loading branch information
jenithainbaraj committed Jan 5, 2023
1 parent 738397f commit 061fa05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/dispatch-new-version-event.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
# 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:
dispatch-new-version-event:
semantic-release:
name: semantic-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
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}"'"}'
node-version: 16
- run: yarn install

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
- run: yarn build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file modified .yarn/install-state.gz
Binary file not shown.

0 comments on commit 061fa05

Please sign in to comment.