Skip to content

Update generateAltText to set level as optional parameter #292

Update generateAltText to set level as optional parameter

Update generateAltText to set level as optional parameter #292

Workflow file for this run

name: CI
on:
pull_request:
push:
# Run CI on all branch pushes. Must use this syntax,
# as we also need to run CI on tag pushes.
branches:
- "**"
tags:
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
build:
name: Build, lint, and publish
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up Node environment
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Restore node_modules cache
uses: actions/cache@v1
id: multinetjs-cache
with:
path: /home/runner/work/multinetjs/multinetjs/node_modules
key: ${{ runner.os }}-${{ hashFiles('/home/runner/work/multinetjs/multinetjs/yarn.lock') }}-multinetjs-cache
- name: Install yarn packages
if: steps.multinetjs-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Run linting test
run: yarn lint
# TODO: Fix
# - name: Run unit tests
# run: yarn test
- name: Create a production build
run: yarn build
- name: Get the publishing version number
id: version-number
run: echo "::set-output name=version::$(git describe --tags | tail -c +2)"
if: startsWith(github.ref, 'refs/tags/')
- name: Publish the package
run: yarn publish --new-version ${{ steps.version-number.outputs.version }} --non-interactive --no-git-tag-version
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')