forked from lxm_front/Mergely
43 lines
840 B
YAML
43 lines
840 B
YAML
name: Publish to npm
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'NPM Tag'
|
|
required: false
|
|
default: 'next'
|
|
|
|
jobs:
|
|
tag-and-publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Setup node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
registry-url: https://registry.npmjs.org
|
|
|
|
- name: Git checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
env:
|
|
CI: true
|
|
|
|
- name: Test
|
|
run: npm run test
|
|
|
|
- name: Build
|
|
run: npm run build:dist
|
|
|
|
- name: Release
|
|
run: npm run release
|
|
|
|
- name: Publish
|
|
run: npm publish --access public --tag ${{ github.event.inputs.tag }}
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|