-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.24 KB
/
ci_publish.yml
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
name: Publish library
on:
release:
types: [created]
env:
NODE: 18
jobs:
ci_tests:
uses: ./.github/workflows/ci_tests.yml
ci_publish:
needs: ci_tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE }}
registry-url: https://registry.npmjs.org/
cache: npm
- name: Install latest npm
run: npm install -g npm@latest
- name: Cache .angular and node_modules
uses: actions/cache@v3
id: cache-step
with:
key: cache-ubuntu-latest-node${{ env.NODE }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
cache-ubuntu-latest-node${{ env.NODE }}-
path: |
.angular/cache
node_modules
- name: Install dependencies
if: steps.cache-step.outputs.cache-hit != 'true'
run: npm clean-install --engine-strict
- name: Build
working-directory: projects/lib
run: npm run build
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.DSI_HUG_NPM_TOKEN }}
run: npm publish ./dist --access public