Skip to content

0.1.5

0.1.5 #131

Workflow file for this run

name: Tests
on:
push:
pull_request:
workflow_dispatch:
inputs:
release:
description: 'Release'
required: true
default: 'true'
new_version:
description: 'New version'
required: true
default: 'one of <newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease'
jobs:
ci:
strategy:
matrix:
os: [ 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
with:
token: ${{ secrets.CI_PAT || github.token }}
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Nomo App (GitHub Action)"
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build
- run: npm run link
- run: ./bin/nomo-webon-cli --version
- run: ./bin/nomo-webon-cli --help
- run: npm run test
- run: git diff
- name: Release
if: ${{ github.event.inputs.release == 'true' && matrix.os == 'ubuntu-latest' }}
run: |
npm version ${{ github.event.inputs.new_version }} --git-tag-version=true
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
npm publish
git push origin && git push origin --tags
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# production_install:
# strategy:
# matrix:
# node: [ '14', '16', '18' ]
# os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
# runs-on: ${{ matrix.os }}
# timeout-minutes: 15
# steps:
# - uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node }}
# - run: node --version
# - run: npm install --global nomo-webon-cli
# - run: nomo-webon-cli --help
# - run: nomo-webon-cli --version