image: node:18.16.1

stages:
    - test
    - deploy

test:
    stage: test
    script:
        - npm install
        - npm run test

deploy:
    stage: deploy
    script:
        - npm config set -- '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
        - npm publish
