Skip to content

Commit 3d22697

Browse files
authored
Moved npm-publish to common workflow
1 parent 8f4880e commit 3d22697

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

.github/workflows/npm-publish.yml

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,8 @@ on:
66
- master
77

88
jobs:
9-
publish:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 12
16-
registry-url: https://registry.npmjs.org/
17-
- run: yarn
18-
- run: yarn build
19-
- run: yarn publish --access=public
20-
env:
21-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22-
notify:
23-
needs: publish
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v2
27-
- name: Get package info
28-
id: package
29-
uses: codex-team/action-nodejs-package-info@v1
30-
- name: Send a message
31-
uses: codex-team/action-codexbot-notify@v1
32-
with:
33-
webhook: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}
34-
message: '📦 [${{ steps.package.outputs.name }}](${{ steps.package.outputs.npmjs-link }}) ${{ steps.package.outputs.version }} was published'
35-
parse_mode: 'markdown'
36-
disable_web_page_preview: true
9+
publish-and-notify:
10+
uses: codex-team/github-workflows/.github/workflows/npm-publish-and-notify-reusable.yml@main
11+
secrets:
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT: ${{ secrets.CODEX_BOT_NOTIFY_EDITORJS_PUBLIC_CHAT }}

0 commit comments

Comments
 (0)