Skip to content

45.0.0-alpha.21

45.0.0-alpha.21 #80

Workflow file for this run

name: Publish NPM package
on:
release:
types: [created]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
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:styles
npm run lint:scripts
npm run prettier:check
npm run type-check
- name: Test
run: npm run test:coverage
- name: Build package
run: |
npm --no-git-tag-version version ${GITHUB_REF#refs/*/}
npm run build
- name: Publish build
run: npm publish ./build --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 }}