mirror of
https://github.com/wickedest/Mergely.git
synced 2026-02-02 09:38:00 +08:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
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: 14
|
|
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
|
|
uses: oleksiyrudenko/gha-git-credentials@v2.1
|
|
with:
|
|
token: '${{ secrets.CI_TOKEN }}'
|
|
name: 'Jamie Peabody'
|
|
email: 'jamie.peabody@gmail.com'
|
|
- run: npm run release
|
|
- run: git push --follow-tags origin master
|
|
|
|
- name: Publish
|
|
run: npm publish --access public --tag ${{ github.event.inputs.tag }}
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|