From 59215a566ff809e8bbb70e2d8a13b3f309cd090c Mon Sep 17 00:00:00 2001 From: Gusev Yaroslav <59017579+GoldenJaden@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:48:50 +0300 Subject: [PATCH] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 33 +++++-------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index f4cd356d..d3c21d00 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -6,31 +6,8 @@ on: - main jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: yarn - - run: yarn build - - run: yarn publish --access=public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - notify: - needs: publish - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Get package info - id: package - uses: codex-team/action-nodejs-package-info@v1 - - name: Send a message - uses: codex-team/action-codexbot-notify@v1 - with: - webhook: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }} - message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published' - parse_mode: 'markdown' - disable_web_page_preview: true + publish-and-notify: + uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}