Skip to content

Commit b45decc

Browse files
Add workflow to publish to nexus
1 parent 6d1f862 commit b45decc

File tree

7 files changed

+94
-6
lines changed

7 files changed

+94
-6
lines changed

.github/actions/copy-npmrc/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Copy .npmrc File"
2+
description: "Create .npmrc file for GitHub (.npmrc.github)"
3+
runs:
4+
using: composite
5+
steps:
6+
- run: mv .npmrc .npmrc_old
7+
shell: bash
8+
9+
- run: cp .npmrc.github .npmrc
10+
shell: bash

.github/actions/swap-npmrc/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: "Swap .npmrc File"
2+
description: "Create .npmrc file for GitHub (.npmrc.github)"
3+
runs:
4+
using: composite
5+
steps:
6+
- run: mv .npmrc.github ./dist/${{ env.DIST_FOLDER}}/.npmrc
7+
shell: bash

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: daily
12+
13+
- package-ecosystem: npm
14+
directory: /webapps
15+
schedule:
16+
interval: daily
17+
open-pull-requests-limit: 30

.github/workflows/dev.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and publish Treeview
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
# Environment variables available to all jobs and steps in this workflow
8+
env:
9+
AZURE_REGISTRY_NAME: diitint
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
NPM_USER: ${{ secrets.AZURE_ARTIFACT_PULL_USER }}
12+
NPM_PASSWORD: ${{ secrets.AZURE_ARTIFACT_PULL_PASSWORD }}
13+
NPM_PUSH_AUTH: ${{ secrets.DIIT_NEXUS_PUSH_AUTH }}
14+
15+
jobs:
16+
build_and_test:
17+
name: Build and publish
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: '16'
25+
26+
- name: Copy .npmrc Files
27+
uses: ./.github/actions/copy-npmrc
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Install Angular CLI
33+
run: npm install -g @angular/cli > /dev/null
34+
35+
- name: Lint
36+
run: npm run lint:term
37+
38+
# - name: Test
39+
# run: npm run test:term
40+
41+
- name: Build Production
42+
run: npm run build:term:prod
43+
44+
- name: Swap .npmrc File
45+
uses: ./.github/actions/swap-npmrc
46+
env:
47+
DIST_FOLDER: terminology-treeview
48+
49+
- name: Publish Library
50+
working-directory: ./dist/terminology-treeview
51+
run: npm publish

.npmrc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
registry=https://diit-nex.eastus.cloudapp.azure.com/repository/npm-all/
2-
//diit-nex.eastus.cloudapp.azure.com/repository/npm-all/:_authToken={DIIT_NEX_TOKEN}
3-
4-
@dedalusdiit:registry=https://npm.pkg.github.com
5-
//npm.pkg.github.com/:_authToken={PKG_TOKEN}
1+
registry=https://registry.npmjs.org/
2+
@orbis-u:registry=https://repo-nexus.orbis.dedalus.com/nexus/repository/npm-all/
3+
#always-auth=true

npmrc.github

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
registry=https://registry.npmjs.org/
2+
@orbis-u:registry=https://diit-nex.eastus.cloudapp.azure.com/repository/npm-all/
3+
@nice:registry=https://diit-nex.eastus.cloudapp.azure.com/repository/npm-all/
4+
//diit-nex.eastus.cloudapp.azure.com/repository/npm-all/:_authToken=***REMOVED***
5+
#always-auth=true

projects/terminology-treeview/tsconfig.lib.prod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
"extends": "./tsconfig.lib.json",
44
"angularCompilerOptions": {
5-
"enableIvy": true
5+
"compilationMode": "partial"
66
}
77
}

0 commit comments

Comments
 (0)