35 lines
853 B
YAML
35 lines
853 B
YAML
name: Release latest on npm
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
|
|
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: Get package version
|
|
run: |
|
|
export VERSION=`cat package.json | grep '"version"' | sed -E 's/\s+"version": "(.*)",/\1/'`
|
|
echo "PKG_VERSION=$VERSION" >> $GITHUB_ENV
|
|
|
|
- name: Update dist-tag
|
|
run: npm dist-tag add mergely@${PKG_VERSION} latest
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Remove 'next' dist-tag
|
|
run: npm dist-tag rm mergely next
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|