Added GH workflows

This commit is contained in:
Andrea Lamparelli 2022-12-22 12:20:19 +01:00
parent fdcd2ad2cf
commit 33cc72a6f6
4 changed files with 94 additions and 0 deletions

20
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,20 @@
**Thank you for submitting this pull request**
fix _(please add the issue ID if it exists)_
### Referenced pull requests
<!-- Add URLs of all referenced pull requests if they exist. This is only required when making
changes that span multiple kiegroup repositories and depend on each other. -->
<!-- Example:
- https://github.com/kiegroup/droolsjbpm-build-bootstrap/pull/1234
- https://github.com/kiegroup/drools/pull/3000
- https://github.com/kiegroup/optaplanner/pull/899
- etc.
-->
### Checklist
- [ ] Documentation updated if applicable.
- [ ] Changelog updated if applicable.
> **Note:** `dist/cli/index.js` and `dist/gha/index.js` are automatically generated by git hooks and gh workflows.

24
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Publish
on:
workflow_dispatch:
inputs:
tag:
description: 'publish the package with the specified tag, default is "latest"'
required: false
default: 'latest'
type: string
jobs:
build:
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 install
- run: npm publish --access public --tag ${{ inputs.tag }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

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

@ -0,0 +1,23 @@
# 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@v2
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci

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

@ -0,0 +1,27 @@
# This manual workflow will bump the project to a new version and tag it, see https://docs.npmjs.com/cli/v8/commands/npm-version#description for more details
name: Version Tag
on:
workflow_dispatch:
inputs:
version:
description: 'version to bump [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]'
required: false
default: 'minor'
type: string
message:
description: 'version commit message to be used'
required: false
default: 'Bumping to version %s'
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm version ${{ inputs.version }} -m "${{ inputs.message }}"