Skip to content

Commit

Permalink
Siva Reddy | Adding GHA to validate PR and publish npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
sivareddyp committed Jun 1, 2023
1 parent c02ed19 commit cd56436
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bahmni Form Controls Package

on:
push:
branches:
- master
- 'release-*'

workflow_dispatch:

jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Node JS 10.19.0
uses: actions/setup-node@v3
with:
node-version: 10.19.0
registry-url: 'https://registry.npmjs.org'
- run: yarn cache clean
- name: Install dependencies
run: brew install automake autoconf libtool dpkg pkgconfig nasm libpng
- name: yarn Install
run: yarn
- name: yarn test
run: yarn test
- run: yarn ci
- name: Publish the package
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
always-auth: true
27 changes: 27 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate PR for Bahmni Form Controls

on:
pull_request:
branches: [ master ]
types: [ opened, synchronize, reopened ]

workflow_dispatch:

jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Node JS 10.19.0
uses: actions/setup-node@v3
with:
node-version: 10.19.0
registry-url: 'https://registry.npmjs.org'
- run: yarn cache clean
- name: Install dependencies
run: brew install automake autoconf libtool dpkg pkgconfig nasm libpng
- name: yarn Install
run: yarn
- name: yarn test
run: yarn test

0 comments on commit cd56436

Please sign in to comment.