Base implementation

This commit is contained in:
Andrea Lamparelli 2022-12-23 19:03:23 +01:00
parent 05d156a5b0
commit 74703c48f3
53 changed files with 34684 additions and 392 deletions

27
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,27 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: "Master CI and Pre Release"
on:
push:
branches:
- master
jobs:
build-and-test:
strategy:
matrix:
node-version: [16]
os: [ubuntu-latest]
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test

24
.github/workflows/pull-request.yml vendored Normal file
View file

@ -0,0 +1,24 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: "Pull Request Checks"
on: pull_request
jobs:
build:
strategy:
matrix:
node-version: [16]
os: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test

44
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,44 @@
# This workflow create a new tag, a release and then publish it to NPM.
name: "Create Release"
on:
workflow_dispatch:
inputs:
version:
description: 'version to bump [major, minor, patch, premajor, preminor, prepatch, prerelease]'
required: false
default: patch
type: string
message:
description: 'version commit message to be used'
required: false
default: 'Bumping version %s'
type: string
jobs:
tag-and-publish:
name: "Tag and Publish"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm version $(semver $npm_package_version -i ${{ inputs.version }}) -m "${{ inputs.message }}"
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
create-release:
name: "Create Release"
needs: tag-and-publish
runs-on: "ubuntu-latest"
steps:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ inputs.version }}"
prerelease: false