diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe9f60a5fd..e09e2cd23c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,4 +67,19 @@ jobs: token: ${{ secrets.HOMEBREW_UTILITY_ACCOUNT }} repository: opticdev/homebrew-optic event-type: version-update - client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' \ No newline at end of file + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' + + # Tells slack a release has happened + notify-slack: + runs-on: ubuntu-latest + # needs: release-npm + name: Message Slack that Release has happened + steps: + - uses: actions/setup-node@v2-beta + name: Setup Node (to determine latest version of Optic) + with: + node-version: 12 + - run: echo ::set-env name=MESSAGE::"${{ github.event.pusher.name }} released version $(npm view @useoptic/cli version) \n Publish Release Notes " + - name: Send message to Slack API + run: | + curl -X POST -H 'Content-type: application/json' --data '{"text":"${{ env.MESSAGE }}"}' ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file