Skip to content

Commit 10e3f36

Browse files
(chore) Use reusable build and release GHA workflows (#703)
1 parent 8bd914a commit 10e3f36

4 files changed

Lines changed: 46 additions & 89 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -5,95 +5,7 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8-
release:
9-
types:
10-
- created
118

129
jobs:
1310
build:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v6
18-
- name: Use Node.js
19-
uses: actions/setup-node@v6
20-
with:
21-
node-version: 20
22-
- run: yarn install --immutable
23-
- run: yarn verify
24-
- run: yarn build
25-
- name: Upload Artifacts
26-
uses: actions/upload-artifact@v7
27-
with:
28-
name: dist
29-
path: |
30-
dist
31-
32-
pre_release:
33-
runs-on: ubuntu-latest
34-
35-
needs: build
36-
37-
if: ${{ github.event_name == 'push' }}
38-
39-
steps:
40-
- run: echo "Uncomment the lines below and delete this one."
41-
- uses: actions/checkout@v6
42-
- name: Download Artifacts
43-
uses: actions/download-artifact@v4
44-
- name: Use Node.js
45-
uses: actions/setup-node@v6
46-
with:
47-
node-version: 20
48-
registry-url: "https://registry.npmjs.org"
49-
- run: yarn install --immutable
50-
- run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"
51-
- run: yarn build
52-
- run: git config user.email "info@openmrs.org" && git config user.name "OpenMRS CI"
53-
- run: git add . && git commit -m "Prerelease version" --no-verify
54-
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag next
55-
env:
56-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
57-
- name: Upload Artifacts
58-
uses: actions/upload-artifact@v7
59-
with:
60-
name: dist
61-
path: |
62-
dist
63-
overwrite: true
64-
65-
release:
66-
runs-on: ubuntu-latest
67-
68-
needs: build
69-
70-
if: ${{ github.event_name == 'release' }}
71-
72-
steps:
73-
- uses: actions/checkout@v6
74-
- name: Download Artifacts
75-
uses: actions/download-artifact@v4
76-
- name: Use Node.js
77-
uses: actions/setup-node@v6
78-
with:
79-
node-version: 20
80-
registry-url: 'https://registry.npmjs.org'
81-
- run: yarn install --immutable
82-
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish
83-
env:
84-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
85-
86-
deploy_billing_app:
87-
runs-on: ubuntu-latest
88-
89-
needs: pre_release
90-
91-
if: ${{ github.event_name == 'push' }}
92-
93-
steps:
94-
- name: 🚀 Trigger RefApp Build
95-
uses: fjogeleit/http-request-action@v1
96-
with:
97-
url: https://ci.openmrs.org/rest/api/latest/queue/O3-BF
98-
method: "POST"
99-
customHeaders: '{ "Authorization": "Bearer ${{ secrets.BAMBOO_TOKEN }}" }'
11+
uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/build-frontend-module.yml@main

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Release & Pre-release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
release:
7+
types:
8+
- created
9+
10+
jobs:
11+
release:
12+
uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/release-frontend-module.yml@main
13+
secrets:
14+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
15+
BOT_PAT: ${{ secrets.BOT_PAT }}

translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"billFinalizedSuccess": "Bill has been finalized successfully",
4444
"billFinalizeFailed": "Failed to finalize bill",
4545
"billing": "Billing",
46+
"billingDetails": "Billing details",
4647
"billingHistory": "Billing history",
4748
"billingSettings": "Billing settings",
4849
"billItem": "Bill item",

turbo.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://turbo.build/schema.json",
3+
"ui": "stream",
4+
"tasks": {
5+
"build": {
6+
"outputs": [
7+
"dist"
8+
]
9+
},
10+
"extract-translations": {
11+
"outputs": [
12+
"./translations"
13+
]
14+
},
15+
"lint": {},
16+
"test": {},
17+
"test:watch": {
18+
"cache": false,
19+
"persistent": true
20+
},
21+
"coverage": {
22+
"outputs": [
23+
"coverage/**"
24+
]
25+
},
26+
"typescript": {},
27+
"verify": {}
28+
}
29+
}

0 commit comments

Comments
 (0)