Skip to content

Commit

Permalink
chore: send message to chat at the end of the release
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedHamouGisaia committed Jan 30, 2025
1 parent b187d72 commit 2720a43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ jobs:
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_CHAT_RELEASE_CHANEL: ${{ secrets.GOOGLE_CHAT_RELEASE_CHANEL }}
run: |
bash release-actions.sh -version=${{inputs.version}} -s=${{inputs.stage}} -i=${{inputs.stage_iteration}} -ref_branch=${{ steps.extract_branch.outputs.branch }}
15 changes: 15 additions & 0 deletions release-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ usage(){
exit 1
}

send_chat_message(){
MESSAGE=$1
if [ -z "$GOOGLE_CHAT_RELEASE_CHANEL" ] ; then
echo "Environement variable GOOGLE_CHAT_RELEASE_CHANEL is not definied ... skipping message publishing"
else
DATA='{"text":"'${MESSAGE}'"}'
echo $DATA
curl -X POST --header "Content-Type:application/json" $GOOGLE_CHAT_RELEASE_CHANEL -d "${DATA}"
fi
}


# ARGUMENTS $1 = VERSION $2 = ref_branch $3 stage $4 stage iteration (for beta & rc)
releaseProd(){
Expand Down Expand Up @@ -104,6 +115,10 @@ releaseProd(){
git commit -m "$commit_message" --allow-empty
git push origin "$BRANCH"
echo "Well done :)"
if [ "$STAGE_LOCAL" == "stable" ] || [ "$STAGE_LOCAL" == "rc" ];
then
send_chat_message "Release of arlas-d3, version ${VERSION}"
fi

}

Expand Down

0 comments on commit 2720a43

Please sign in to comment.