Skip to content

chore(deps): update jamesives/github-pages-deploy-action action to v4… #706

chore(deps): update jamesives/github-pages-deploy-action action to v4…

chore(deps): update jamesives/github-pages-deploy-action action to v4… #706

Workflow file for this run

name: ci
on: [push]
jobs:
build:
name: node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14
- 15
- 16
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Use node version ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- run: npm ci
- run: npm run build
- run: npm test
coverage:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-16-
- name: Use node version 16
uses: actions/setup-node@v4
with:
node-version: 16
- run: npm ci
- run: npm run coverage
- run: npm run coverage:report
- name: Upload coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-16-
- name: Use node version 16
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run build:docs
- name: Publish docs to github pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/build
nightly:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-16-
- name: Use node version 16
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm version "$(npm view currency.js@latest version)-${GITHUB_SHA:0:8}" --allow-same-version --no-git-tag-version
- run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}