Skip to content

Commit 16204e2

Browse files
Harmeet SinghHarmeet Singh
authored andcommitted
fix the yml
1 parent cd9884b commit 16204e2

2 files changed

Lines changed: 15 additions & 36 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
1-
name: CI (datagrid)
1+
name: CI (ngbootstrap)
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
push: { branches: [ main ] }
5+
pull_request: { branches: [ main ] }
86

97
jobs:
108
build:
119
runs-on: ubuntu-latest
1210
steps:
1311
- uses: actions/checkout@v4
14-
1512
- uses: actions/setup-node@v4
1613
with:
1714
node-version: '20'
18-
cache: 'npm'
19-
20-
- run: npm ci
21-
22-
# ---- choose ONE build command ----
23-
# Angular CLI:
24-
- run: npm run build datagrid
25-
if: ${{ hashFiles('angular.json') != '' }}
26-
27-
# Nx:
28-
- run: npx nx build datagrid
29-
if: ${{ hashFiles('nx.json') != '' }}
30-
31-
# Optional:
32-
- run: npm run lint --if-present
33-
- run: npm run test --if-present
15+
cache: 'pnpm' # <-- important
16+
cache-dependency-path: pnpm-lock.yaml
17+
- run: corepack enable
18+
- run: pnpm install --frozen-lockfile
19+
- run: pnpm build

.github/workflows/release.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,13 @@ jobs:
1515
- uses: actions/setup-node@v4
1616
with:
1717
node-version: '20'
18+
cache: 'pnpm'
19+
cache-dependency-path: pnpm-lock.yaml
1820
registry-url: 'https://registry.npmjs.org'
19-
cache: 'npm'
20-
- run: npm ci
21-
22-
# Angular CLI:
23-
- run: npm run build datagrid
24-
if: ${{ hashFiles('angular.json') != '' }}
25-
# Nx:
26-
- run: npx nx build datagrid
27-
if: ${{ hashFiles('nx.json') != '' }}
28-
29-
- name: Publish
30-
run: |
31-
cd dist/datagrid || cd dist/libs/datagrid
32-
npm publish --access public
21+
- run: corepack enable
22+
- run: pnpm install --frozen-lockfile
23+
- run: pnpm build
24+
- name: Publish to npm
25+
run: npm publish dist --access public
3326
env:
3427
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)