Skip to content

Configure Renovate #127

Configure Renovate

Configure Renovate #127

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use NodeJS v${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Test
run: npm test
- name: Coverage
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./tests/coverage/lcov.info
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use NodeJS v16
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install
run: npm ci
- name: Lint
run: npm run lint
npm:
if: startsWith(github.ref, 'refs/tags/')
needs:
- test
- lint
name: NPM Package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use NodeJS v16
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm ci
- name: Sanity check
run: |
npm run lint
npm test
- name: Deploy to NPM
uses: JS-DevTools/npm-publish@v1.4.3
with:
token: ${{ secrets.NPM_TOKEN }}
release:
name: Release
needs: npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get tag metadata
id: tag
run: |
TAG_TITLE=${GITHUB_REF#refs/*/}
echo ::set-output name=title::$TAG_TITLE
git -c protocol.version=2 fetch --prune --progress \
--no-recurse-submodules origin \
+refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
TAG_BODY="$(git tag -l --format='%(contents)' $TAG_TITLE)"
TAG_BODY="${TAG_BODY//'%'/'%25'}"
TAG_BODY="${TAG_BODY//$'\n'/'%0A'}"
TAG_BODY="${TAG_BODY//$'\r'/'%0D'}"
echo ::set-output name=body::$TAG_BODY
- name: Create Release
uses: actions/create-release@v1.1.4
id: create-release
with:
tag_name: ${{ steps.tag.outputs.title }}
release_name: ${{ steps.tag.outputs.title }}
body: ${{ steps.tag.outputs.body }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}