Skip to content

Update actions/setup-node action to v4 #88

Update actions/setup-node action to v4

Update actions/setup-node action to v4 #88

Workflow file for this run

# This workflow does a clean installation of Node dependencies, caches/restores them,
# builds the source code, and runs tests with the specified version of Node.
name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# Note: This action must be run before 'actions/setup-node' if we let
# 'actions/setup-node' handle caching for us because it will run 'pnpm store path'
# to get the path to the pnpm virtual store.
#
# See https://github.com/pnpm/action-setup for more details.
- uses: pnpm/action-setup@v2
with:
version: 7
# https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs
# https://docs.github.com/actions/using-workflows/caching-dependencies-to-speed-up-workflows
# https://github.com/actions/setup-node
- uses: actions/setup-node@v4
with:
node-version: 16
cache: pnpm
- run: pnpm install --frozen-lockfile --prefer-offline
- run: pnpm lint
- run: pnpm test
- run: pnpm build
# https://docs.github.com/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact
#
# It's currently not possible to preview files in the artifact. Follow up with
# https://github.com/actions/upload-artifact/issues/14 for further updates.
- uses: actions/upload-artifact@v3
with:
path: |
coverage
dist
install4j:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
version:
- '9.0.7'
- '10.0.4'
runs-on: ${{ matrix.os }}
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# Run our own action to verify that it works with all combinations of supported
# operating systems and versions of install4j
- uses: ./
with:
version: ${{ matrix.version }}
license: ${{ secrets.INSTALL4J_LICENSE_KEY }}
# https://www.ej-technologies.com/resources/install4j/help/doc/cli/compiler.html
- run: install4jc --version