Skip to content

Commit 6bbd1f8

Browse files
authored
build: update github actions
1 parent 1d42089 commit 6bbd1f8

File tree

2 files changed

+51
-79
lines changed

2 files changed

+51
-79
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,23 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v3
16-
17-
- name: Install Node.js
18-
uses: actions/setup-node@v3
14+
# Check out the repository
15+
- uses: actions/checkout@v3
1916
with:
20-
node-version: 16
17+
fetch-depth: 0
2118

22-
- uses: pnpm/action-setup@v2
23-
name: Install pnpm
24-
id: pnpm-install
19+
# Install Pnpm
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v2.2.1
2522
with:
26-
version: 7
27-
run_install: false
28-
29-
- name: Get pnpm store directory
30-
id: pnpm-cache
31-
shell: bash
32-
run: |
33-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
34-
35-
- uses: actions/cache@v3
36-
name: Setup pnpm cache
23+
version: "7.x"
24+
# Install Node.js
25+
- name: Use Node.js
26+
uses: actions/setup-node@v3
3727
with:
38-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
39-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40-
restore-keys: |
41-
${{ runner.os }}-pnpm-store-
42-
28+
node-version: "16.x"
29+
cache: 'pnpm'
30+
# Install workspace dependencies
4331
- name: Install dependencies
4432
run: pnpm install
4533

.github/workflows/npmpublish.yml

Lines changed: 38 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,77 +8,61 @@ jobs:
88
publish-npm:
99
runs-on: ubuntu-latest
1010
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
1613
with:
17-
node-version: 16
14+
fetch-depth: 0
1815

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
2219
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
3424
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
4029
- name: Install dependencies
4130
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
4436
env:
4537
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
4638

4739
publish-gpr:
4840
runs-on: ubuntu-latest
4941
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
5544
with:
56-
node-version: 16
45+
fetch-depth: 0
5746

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
6150
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
7355
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
7960
- name: Install dependencies
8061
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
8367
env:
8468
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)