Skip to content

Commit

Permalink
(chore) Adds ci to publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
pirupius committed Feb 12, 2024
1 parent b92b8c2 commit 4bda2e1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Node.js CI

on:
push:
branches: [main]
branches: [main, chore/release-ci]
pull_request:
branches: [main]
branches: [main, chore/release-ci]
release:
types:
- created

env:
ESM_NAME: "@openmrs/esm-template-app"
JS_NAME: "openmrs-esm-template-app.js"
ESM_NAME: "@openmrs/esm-billing-app"
JS_NAME: "openmrs-esm-billing-app.js"

jobs:
build:
Expand Down Expand Up @@ -42,28 +42,28 @@ jobs:

steps:
- run: echo "Uncomment the lines below and delete this one."
# - uses: actions/checkout@v2
# - name: Download Artifacts
# uses: actions/download-artifact@v3
# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: "18.x"
# registry-url: "https://registry.npmjs.org"
# - run: yarn install --immutable
# - run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"
# - run: yarn build
# - run: git config user.email "[email protected]" && git config user.name "OpenMRS CI"
# - run: git add . && git commit -m "Prerelease version" --no-verify
# - run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag next
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: dist
# path: |
# dist
- uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install --immutable
- run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"
- run: yarn build
- run: git config user.email "[email protected]" && git config user.name "OpenMRS CI"
- run: git add . && git commit -m "Prerelease version" --no-verify
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
release:
runs-on: ubuntu-latest
Expand All @@ -85,7 +85,7 @@ jobs:
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

deploy:
runs-on: ubuntu-latest

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# @openmrs/esm-billing-app
# OpenMRS 3.x Billing ESM

Billing microfontend for O3.

## Contributing

For more information on how to get started, please refer to [OpenMRS Frontend Developer Documentation](https://o3-docs.openmrs.org/docs/introduction).

0 comments on commit 4bda2e1

Please sign in to comment.