|
5 | 5 | branches: [main] |
6 | 6 | pull_request: |
7 | 7 | branches: [main] |
8 | | - release: |
9 | | - types: |
10 | | - - created |
11 | 8 |
|
12 | 9 | jobs: |
13 | 10 | 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 |
0 commit comments