Skip to content

Commit

Permalink
Merge pull request #1033 from Infineon/1025-webex-space-notification-…
Browse files Browse the repository at this point in the history
…on-new-release

Enhancement: Webex notification on new version release
  • Loading branch information
verena-ifx authored Mar 11, 2024
2 parents 1179c60 + 385ae42 commit 9a0f9f3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/shipit_master_and_example_apps_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
VERSION=$(auto shipit --dry-run --quiet)
echo "Publishing: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "WEBEX_MESSAGE=New package release - Version: $VERSION" >> $GITHUB_ENV
auto shipit
- name: Sleep for 10 seconds #needed because we had runtime issues where the wrappers are not getting the newest version
Expand Down Expand Up @@ -233,4 +234,14 @@ jobs:
pr-preview-angular-example/
pr-preview-vanilla-example/
force: false


send-webex-notification:
needs: [stencil-library-release, deploy-master-vue, deploy-master-react, deploy-master-angular, deploy-master-vanilla]
runs-on: ubuntu-latest
steps:
- name: Send Webex Notification
run: |
VERSION=${{ needs.stencil-library-release.outputs.VERSION }}
WEBEX_MESSAGE="**VERSION UPDATE**\nA new version has been released: [$VERSION](https://github.com/Infineon/infineon-design-system-stencil/releases/tag/v$VERSION)\nFollow the link to see what's included in this release."
curl https://webexapis.com/v1/messages -X POST -H "Authorization: Bearer ${{ secrets.WEBEX_TOKEN }}" -H "Content-Type: application/json" -d "{\"roomId\":\"${{ secrets.WEBEX_ROOM_ID }}\",\"markdown\":\"$WEBEX_MESSAGE\"}"
shell: bash
16 changes: 15 additions & 1 deletion .github/workflows/shipit_pr_and_example_apps_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
echo "CANARY_VERSION=$CANARY_VERSION" >> $GITHUB_ENV
echo "CANARY_VERSION=$CANARY_VERSION" >> $GITHUB_OUTPUT
echo "Set Canary version as Github Env and Github Output: $CANARY_VERSION"
echo "WEBEX_MESSAGE=New package release - Version: $CANARY_VERSION" >> $GITHUB_ENV
auto shipit
- name: Sleep for 10 seconds #needed because we had runtime issues where the wrappers are not getting the newest version
Expand Down Expand Up @@ -257,4 +259,16 @@ jobs:
});
}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

# send-webex-notification: commented out and left in here as a reference for testing
# needs: [stencil-library-release, deploy-preview-vue, deploy-preview-react, deploy-preview-angular, deploy-preview-vanilla, update-pr-comment]
# runs-on: ubuntu-latest
# steps:
# - name: Send Webex Notification
# run: |
# VERSION=20.50.3
# CANARY_VERSION=${{ needs.stencil-library-release.outputs.CANARY_VERSION }}
# WEBEX_MESSAGE="**VERSION UPDATE**\nA new version has been released: [$CANARY_VERSION](https://github.com/Infineon/infineon-design-system-stencil/releases/tag/v$VERSION)\nFollow the link to see what's included in this release."
# curl https://webexapis.com/v1/messages -X POST -H "Authorization: Bearer ${{ secrets.WEBEX_TOKEN }}" -H "Content-Type: application/json" -d "{\"roomId\":\"${{ secrets.WEBEX_ROOM_ID }}\",\"markdown\":\"$WEBEX_MESSAGE\"}"
# shell: bash

0 comments on commit 9a0f9f3

Please sign in to comment.