-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/indicate-schema-errors
- Loading branch information
Showing
9 changed files
with
1,377 additions
and
1,005 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,48 +10,45 @@ on: | |
- created | ||
|
||
env: | ||
ESM_NAME: "@openmrs/esm-form-builder-app" | ||
JS_NAME: "openmrs-esm-form-builder-app.js" | ||
TURBO_API: 'http://127.0.0.1:9080' | ||
TURBO_TOKEN: 'turbo-token' | ||
TURBO_TEAM: ${{ github.repository_owner }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
TURBO_API: 'http://127.0.0.1:9080' | ||
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
TURBO_TEAM: ${{ github.repository_owner }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
- name: π οΈ Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Cache dependencies | ||
- name: πΎ Cache dependencies | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
- name: π¦ Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- name: Setup local cache server for Turborepo | ||
- name: π Setup local cache server for Turborepo | ||
uses: felixmosh/turborepo-gh-artifacts@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
server-token: ${{ secrets.TURBO_SERVER_TOKEN }} | ||
server-token: ${{ env.TURBO_TOKEN }} | ||
|
||
- name: Run tests, lint and typechecking | ||
- name: π§ͺ Run tests, lint and type checks | ||
run: yarn verify | ||
|
||
- name: Run build | ||
- name: ποΈ Run build | ||
run: yarn turbo run build | ||
|
||
- name: Upload Artifacts | ||
- name: π€ Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
|
@@ -68,59 +65,51 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
- name: π οΈ Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Cache dependencies | ||
- name: πΎ Cache dependencies | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
- name: π¦ Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- name: Version | ||
- name: π Setup local cache server for Turborepo | ||
uses: felixmosh/turborepo-gh-artifacts@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
server-token: ${{ env.TURBO_TOKEN }} | ||
|
||
- name: π·οΈ Version | ||
run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}" | ||
|
||
- name: Build | ||
- name: ποΈ Build | ||
run: yarn turbo run build | ||
|
||
- name: π§ Configure Git | ||
run: git config user.email "[email protected]" && git config user.name "OpenMRS CI" | ||
- name: πΎ Commit changes | ||
run: git add . && git commit -m "Prerelease version" --no-verify | ||
|
||
- run: git config user.email "[email protected]" && git config user.name "OpenMRS CI" | ||
- run: git add . && git commit -m "Prerelease version" --no-verify | ||
|
||
- name: Pre-release | ||
- name: π Pre-release | ||
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 | ||
- name: π€ Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: | | ||
dist | ||
overwrite: true | ||
|
||
deploy_form_builder: | ||
runs-on: ubuntu-latest | ||
|
||
needs: pre_release | ||
|
||
if: ${{ github.event_name == 'push' }} | ||
|
||
steps: | ||
- name: Trigger RefApp Build | ||
uses: fjogeleit/http-request-action@v1 | ||
with: | ||
url: https://ci.openmrs.org/rest/api/latest/queue/O3-BF | ||
method: "POST" | ||
customHeaders: '{ "Authorization": "Bearer ${{ secrets.BAMBOO_TOKEN }}" }' | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -130,35 +119,56 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download Artifacts | ||
|
||
- name: π₯ Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
- name: Use Node.js | ||
- name: π οΈ Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Cache dependencies | ||
- name: πΎ Cache dependencies | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
- name: π¦ Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- name: Build | ||
- name: π Setup local cache server for Turborepo | ||
uses: felixmosh/turborepo-gh-artifacts@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
server-token: ${{ env.TURBO_TOKEN }} | ||
|
||
- name: ποΈ Build | ||
run: yarn turbo run build | ||
- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public | ||
- name: π Publish to NPM | ||
run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
- name: Upload Artifacts | ||
- name: π€ Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: | | ||
dist | ||
overwrite: true | ||
|
||
deploy_form_builder: | ||
runs-on: ubuntu-latest | ||
|
||
needs: pre_release | ||
|
||
if: ${{ github.event_name == 'push' }} | ||
|
||
steps: | ||
- name: π Trigger RefApp Build | ||
uses: fjogeleit/http-request-action@v1 | ||
with: | ||
url: https://ci.openmrs.org/rest/api/latest/queue/O3-BF | ||
method: "POST" | ||
customHeaders: '{ "Authorization": "Bearer ${{ secrets.BAMBOO_TOKEN }}" }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.