Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

chore: update version (#26) #70

chore: update version (#26)

chore: update version (#26) #70

Workflow file for this run

name: build
on:
push:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
scope: '@lemoncloud'
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm ci and publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
LATEST=`npm view . version`
CURRENT=`cat package.json | jq -r .version`
if [ "$LATEST" != "$CURRENT" ]
then
npm ci
npm publish
fi