-
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.
changed newversion event for publish
- Loading branch information
1 parent
738397f
commit 061fa05
Showing
2 changed files
with
14 additions
and
24 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,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 not shown.