Skip to content

Commit

Permalink
Merge pull request #194 from gisaia/chore/send_message
Browse files Browse the repository at this point in the history
chore: send message at the end of the release
  • Loading branch information
MohamedHamouGisaia authored Jan 31, 2025
2 parents 05b78bc + fb70663 commit 686c25f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 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 }}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-release.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "gisaia-team",
"license": "Apache-2.0",
"dependencies": {
"arlas-api": "26.0.0",
"arlas-api": "27.0.0",
"rxjs": "^7.4.0"
},
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "gisaia",
"license": "Apache-2.0",
"dependencies": {
"arlas-api": "26.0.0",
"arlas-api": "27.0.0",
"patch-package": "^6.4.7",
"rxjs": "^7.4.0"
},
Expand Down
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-web-core, version ${VERSION}"
fi

}

Expand Down

0 comments on commit 686c25f

Please sign in to comment.