diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..f4cd356 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,36 @@ +name: Publish package to NPM + +on: + push: + branches: + - 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 diff --git a/package.json b/package.json index d28a147..e9d5aa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/text-variant-tune", - "version": "1.0.0", + "version": "1.0.1", "main": "dist/text-variant-tune.js", "repository": "https://github.com/editor-js/text-variant-tune", "author": "CodeX ",