-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "changed newversion event for publish"
This reverts commit 061fa05.
- Loading branch information
1 parent
169795e
commit ce26eaf
Showing
2 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.