|
8 | 8 | publish-npm:
|
9 | 9 | runs-on: ubuntu-latest
|
10 | 10 | steps:
|
11 |
| - - name: Checkout |
12 |
| - uses: actions/checkout@v3 |
13 |
| - |
14 |
| - - name: Install Node.js |
15 |
| - uses: actions/setup-node@v3 |
| 11 | + # Check out the repository |
| 12 | + - uses: actions/checkout@v3 |
16 | 13 | with:
|
17 |
| - node-version: 16 |
| 14 | + fetch-depth: 0 |
18 | 15 |
|
19 |
| - - uses: pnpm/action-setup@v2 |
20 |
| - name: Install pnpm |
21 |
| - id: pnpm-install |
| 16 | + # Install Pnpm |
| 17 | + - name: Install pnpm |
| 18 | + uses: pnpm/action-setup@v2.2.1 |
22 | 19 | with:
|
23 |
| - version: 7 |
24 |
| - run_install: false |
25 |
| - |
26 |
| - - name: Get pnpm store directory |
27 |
| - id: pnpm-cache |
28 |
| - shell: bash |
29 |
| - run: | |
30 |
| - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT |
31 |
| -
|
32 |
| - - uses: actions/cache@v3 |
33 |
| - name: Setup pnpm cache |
| 20 | + version: "7.x" |
| 21 | + # Install Node.js |
| 22 | + - name: Use Node.js |
| 23 | + uses: actions/setup-node@v3 |
34 | 24 | with:
|
35 |
| - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} |
36 |
| - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
37 |
| - restore-keys: | |
38 |
| - ${{ runner.os }}-pnpm-store- |
39 |
| -
|
| 25 | + node-version: "16.x" |
| 26 | + registry-url: 'https://registry.npmjs.org/' |
| 27 | + cache: 'pnpm' |
| 28 | + # Install workspace dependencies |
40 | 29 | - name: Install dependencies
|
41 | 30 | run: pnpm install
|
42 |
| - - run: pnpm build ngx-cz-in --prod |
43 |
| - - run: pnpm publish dist/libs/ngx-cz-in --access public |
| 31 | + |
| 32 | + - name: Build |
| 33 | + run: pnpm build ngx-cz-in --prod |
| 34 | + |
| 35 | + - run: pnpm publish dist/libs/ngx-cz-in --no-git-checks |
44 | 36 | env:
|
45 | 37 | NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
46 | 38 |
|
47 | 39 | publish-gpr:
|
48 | 40 | runs-on: ubuntu-latest
|
49 | 41 | steps:
|
50 |
| - - name: Checkout |
51 |
| - uses: actions/checkout@v3 |
52 |
| - |
53 |
| - - name: Install Node.js |
54 |
| - uses: actions/setup-node@v3 |
| 42 | + # Check out the repository |
| 43 | + - uses: actions/checkout@v3 |
55 | 44 | with:
|
56 |
| - node-version: 16 |
| 45 | + fetch-depth: 0 |
57 | 46 |
|
58 |
| - - uses: pnpm/action-setup@v2 |
59 |
| - name: Install pnpm |
60 |
| - id: pnpm-install |
| 47 | + # Install Pnpm |
| 48 | + - name: Install pnpm |
| 49 | + uses: pnpm/action-setup@v2.2.1 |
61 | 50 | with:
|
62 |
| - version: 7 |
63 |
| - run_install: false |
64 |
| - |
65 |
| - - name: Get pnpm store directory |
66 |
| - id: pnpm-cache |
67 |
| - shell: bash |
68 |
| - run: | |
69 |
| - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT |
70 |
| -
|
71 |
| - - uses: actions/cache@v3 |
72 |
| - name: Setup pnpm cache |
| 51 | + version: "7.x" |
| 52 | + # Install Node.js |
| 53 | + - name: Use Node.js |
| 54 | + uses: actions/setup-node@v3 |
73 | 55 | with:
|
74 |
| - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} |
75 |
| - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
76 |
| - restore-keys: | |
77 |
| - ${{ runner.os }}-pnpm-store- |
78 |
| -
|
| 56 | + node-version: "16.x" |
| 57 | + registry-url: 'https://registry.npmjs.org/' |
| 58 | + cache: 'pnpm' |
| 59 | + # Install workspace dependencies |
79 | 60 | - name: Install dependencies
|
80 | 61 | run: pnpm install
|
81 |
| - - run: pnpm build ngx-cz-in --prod |
82 |
| - - run: pnpm publish dist/libs/ngx-cz-in |
| 62 | + |
| 63 | + - name: Build |
| 64 | + run: pnpm build ngx-cz-in --prod |
| 65 | + |
| 66 | + - run: pnpm publish dist/libs/ngx-cz-in --no-git-checks |
83 | 67 | env:
|
84 | 68 | NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
0 commit comments