Skip to content

Add first attempt at actions file #2

Add first attempt at actions file

Add first attempt at actions file #2

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
# from travis
# env:
# CHANGED_FILES: $(git diff --name-only $TRAVIS_COMMIT_RANGE)
jobs:
test:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
steps:
- name: 'Set up Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node-version }}'
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |-
node_modules
$HOME/.npm
key: '${{ runner.os }}-${{ hashFiles(''TODO'') }}'
- uses: actions/checkout@v4
with:
fetch-depth: 0
since_last_remote_commit: true
- run: 'echo ${{ steps.changed-files.outputs.all_changed_files }}'
- run: 'npm run bootstrap && npm run build:ci'
publish:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 14.x
# if: ${{ github.event_name != 'pull_request' }}
if: github.ref == 'refs/heads/main'
steps:
- name: Publish Package(s)
run: 'npm run publish'
# from travis
# - run: >-
# if [[ $TRAVIS_PULL_REQUEST = "false" ]]; then PUBLISH_PACKAGE=true;
# else PUBLISH_PACKAGE=false; fi
# - run: >-
# echo "Pull Request: $TRAVIS_PULL_REQUEST" && echo "Node:
# $TRAVIS_NODE_VERSION" && echo "Publish? $PUBLISH_PACKAGE"
# - run: 'if [ $PUBLISH_PACKAGE = "true" ]; then npm run publish; fi'