-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate step for building node modules
- Loading branch information
1 parent
8bfcd5b
commit 39e0542
Showing
5 changed files
with
120 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: build npm-lib | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ENVIRONMENT: | ||
required: true | ||
type: string | ||
MICROSERVICE_NAME: | ||
required: true | ||
type: string | ||
EXPORT_MODULE: | ||
required: false | ||
type: string | ||
DOWNLOAD_FILE: | ||
required: false | ||
type: string | ||
DOWNLOAD_PATH: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ inputs.ENVIRONMENT }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
|
||
- name: Set up nodejs | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 14 | ||
|
||
#NOTE: necessary to build client-war | ||
- name: Add .npmrc file | ||
run: echo -e '${{ secrets.NPMRC }}' > ~/.npmrc | ||
|
||
- name: download files from other jobs | ||
if: ${{ inputs.DOWNLOAD_FILE }} | ||
uses: actions/download-artifact | ||
with: | ||
name: ${{ inputs.DOWNLOAD_FILE}} | ||
path: ${{ inputs.DOWNLOAD_PATH}} | ||
|
||
- name: | ||
run: | ||
cd ${{ inputs.MICROSERVICE_NAME }}/${{ inputs.MICROSERVICE_NAME }}/src/main/angular | ||
npm install | ||
npm run generate | ||
npm run build | ||
npm pack | ||
|
||
- name: Extract version number | ||
id: getVersion | ||
run: echo "VERSION_NUMBER=$(grep -Po -m 1 '(?<=<version>)[0-9\.]+' ${{ inputs.MICROSERVICE_NAME }}/pom.xml )" >> $GITHUB_OUTPUT | ||
|
||
- name: upload module | ||
uses: actions/upload-artifact | ||
with: | ||
name: ${{inputs.EXPORT_MODULE}} | ||
path: ${{ inputs.MICROSERVICE_NAME }}/${{ inputs.MICROSERVICE_NAME }}/src/main/angular/${{ inputs.EXPORT_MODULE}}-${{ steps.getVersion.outputs.VERSION_NUMBER }}.tgz | ||
|
||
|
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
1 change: 1 addition & 0 deletions
1
cirras-underwriting-ngclient-lib/cirras-underwriting-ngclient-lib/.gitignore
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
target/ | ||
**/generated/** |
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