Skip to content

Commit

Permalink
Merge pull request #1 from lampajr/gh_workflows
Browse files Browse the repository at this point in the history
Added GitHub Workflows
  • Loading branch information
lampajr committed Dec 22, 2022
1 parent 630a726 commit ffa7d1b
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -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 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 23 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 27 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -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 }}"

0 comments on commit ffa7d1b

Please sign in to comment.