Skip to content

11.0.0-alpha.50

11.0.0-alpha.50 #66

Workflow file for this run

name: Publish NPM 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: 18
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
- name: Lint
run: |
npm run lint
npm run type-check
- name: Test
run: npm run test -- --coverage --forceExit
- name: Build package
run: |
npm --no-git-tag-version version ${GITHUB_REF#refs/*/}
npm pkg delete scripts.prepare
npm run build
- name: Publish package
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 }}