forked from lxm_front/Mergely
chore(ci): added workflows
This commit is contained in:
34
.github/workflows/npm-release.yaml
vendored
Normal file
34
.github/workflows/npm-release.yaml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
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/.*: "(.*)",/\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 }}
|
||||
Reference in New Issue
Block a user