Skip to content

Module type

Module type #21

Workflow file for this run

name: npm-publish
on:
push:
branches:
- main
paths:
- '**'
- '!README.md'
workflow_dispatch:
jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
cache: "yarn"
- name: Install dependencies
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Build
run: npm run build
- name: Publish new version
working-directory: ./dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm publish