Skip to content

Workflow file for this run

name: Publish Node.js Package
on:
release:
types: [created]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- uses: ./.github/actions/publish-notify
with:
stage: start
tg-bot-token: ${{ secrets.TG_BOT_TOKEN }}
tg-chat-id: ${{ secrets.TG_CHAT_ID }}
- name: Install dependencies
run: npm ci
- run: npm pkg delete scripts.prepare
- run: npm --no-git-tag-version version ${GITHUB_REF#refs/*/}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- uses: ./.github/actions/publish-notify
if: success()
with:
stage: done
tg-bot-token: ${{ secrets.TG_BOT_TOKEN }}
tg-chat-id: ${{ secrets.TG_CHAT_ID }}
- uses: ./.github/actions/publish-notify
if: failure()
with:
stage: fail
tg-bot-token: ${{ secrets.TG_BOT_TOKEN }}
tg-chat-id: ${{ secrets.TG_CHAT_ID }}