-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (56 loc) · 1.84 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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: Remove .npmrc file if exists
run: |
if [ -f .npmrc ]; then
rm .npmrc
fi
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: ${{ env.NEXUS_URL }}
scope: '@nuxeo'
- name: Configure Additional Registries
run: |
npm config set @hylandsoftware:registry https://npm.pkg.github.com --global
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GIT_TOKEN }} --global
npm config set //packages.nuxeo.com/repository/npm-public/:_authToken=${{ secrets.NPM_ADMIN_TOKEN }} --global
npm config set "@nuxeo:registry" "https://packages.nuxeo.com/repository/npm-public" --global
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install Dependencies
working-directory: nuxeo-admin-console-web/ang-src
run: npm install
- name: Build Angular Project
working-directory: nuxeo-admin-console-web/ang-src
run: npm run build