From cf1b13f4acea25bf1a8cb91a300fdbdb80704bb4 Mon Sep 17 00:00:00 2001 From: Iury Nogueira Date: Tue, 5 Dec 2023 15:31:15 -0300 Subject: [PATCH] feat: send msg to google when new version is available :sparkles: (#975) --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7088b6ff..eb0322446 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,3 +32,15 @@ jobs: working-directory: dist/ion env: NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + + - name: Send message to Google Chat + run: | + API_KEY="${{ secrets.GOOGLE_CHAT_API_KEY }}" + TOKEN="${{ secrets.GOOGLE_CHAT_TOKEN }}" + SPACE_ID="${{ secrets.SPACE_ID }}" + MESSAGE="Ion - Nova versão disponível!" + + curl -X POST \ + -H "Content-Type: application/json; charset=UTF-8" \ + -d "{\"text\": \"${MESSAGE}\"}" \ + "https://chat.googleapis.com/v1/spaces/${SPACE_ID}/messages?key=${API_KEY}&token=${TOKEN}"