From 1e44622683f40e337a1bc9ff3ee575e75c18613c Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 12 Aug 2020 14:38:20 +0300 Subject: [PATCH] fix telegram message; checks for package.json --- .github/workflows/nodejs.yml | 23 ++++++++++++++++++++++- package.json | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 77a9ce1..fffb082 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -26,6 +26,16 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Set vars + id: vars + run: | + echo "::set-output name=version::$(echo ${GITHUB_REF#refs/tags/v})" + echo "::set-output name=repo_name::$(echo ${GITHUB_REPOSITORY#*/})" + + - name: Check package.json version vs tag + run: | + [ ${{ steps.vars.outputs.version }} = $(grep '"version":' package.json | grep -o "[0-9.]*") ] || (echo "Git tag doesn't match version in package.json" && false) + - name: Build and push Docker image uses: docker/build-push-action@v1.1.0 with: @@ -41,6 +51,17 @@ jobs: with: to: ${{ secrets.TELEGRAM_CHAT_ID }} token: ${{ secrets.TELEGRAM_BOT_TOKEN }} - message: ๐Ÿš€ Published [${{ steps.vars.outputs.repo_name }}](https://github.com/${{ github.repository }}) version [${{ steps.vars.outputs.version }}](https://www.npmjs.com/package/${{ steps.vars.outputs.repo_name }}/v/${{ steps.vars.outputs.version }}) to npm + message: ๐Ÿš€ Published a [${{ steps.vars.outputs.repo_name }}](https://github.com/${{ github.repository }}) version ${{ steps.vars.outputs.version }} to docker hub + debug: true + format: markdown + + - name: Telegram Message Notify + uses: appleboy/telegram-action@0.0.7 + with: + to: ${{ secrets.TELEGRAM_RELAYER_CHAT_ID }} + token: ${{ secrets.TELEGRAM_BOT_TOKEN }} + message: | + ๐Ÿš€ Published a new version of the relayer node service to docker hub: `tornadocash/relayer:${{ steps.vars.outputs.version }}`, `tornadocash/relayer:latest`. + โ—๏ธPlease update your nodes โ—๏ธ debug: true format: markdown diff --git a/package.json b/package.json index 99ff33e..3c20716 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "relay", - "version": "3.0.1", + "version": "3.0.2", "description": "Relayer for Tornado.cash privacy solution. https://tornado.cash", "main": "app.js", "scripts": {