SUPINT-2380: nuxeo admin console web scripts works #84
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
name: Build | |
on: | |
pull_request: | |
branches: | |
- dev | |
workflow_call: | |
inputs: | |
branch: | |
description: 'The current branch' | |
default: dev | |
type: string | |
required: false | |
debug: | |
type: boolean | |
description: enable debug | |
default: false | |
env: | |
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'dev' }} | |
enabledebug: ${{ inputs.debug == true && '-vvv' || ''}} | |
NEXUS_URL: https://packages.nuxeo.com/repository/npm-public/ | |
NEXUS_REPOSITORY: npm-public | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ADMIN_TOKEN }} | |
GIT_TOKEN: ${{ secrets.GIT_TOKEN}} | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.BRANCH_NAME }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
registry-url: ${{ env.NEXUS_URL }} | |
scope: '@nuxeo' | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: 'Update settings.xml with server configuration' | |
run: | | |
echo '<settings> | |
<servers> | |
<server> | |
<id>maven-internal</id> | |
<username>${{ secrets.PACKAGES_AUTH_USER }}</username> | |
<password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password> | |
</server> | |
</servers> | |
</settings>' > ~/.m2/settings.xml | |
- name: Configure Additional Registries | |
working-directory: nuxeo-admin-console-web/ang-src | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GIT_TOKEN }}" >> .npmrc | |
- name: Install Angular CLI | |
run: npm install -g @angular/cli | |
- name: Build Angular Project | |
run: mvn package | |
- name: Verify Package | |
working-directory: nuxeo-admin-console-package/target | |
run: | | |
echo "List of Files" | |
ls -al | |