Skip to content

Commit dbb235d

Browse files
committed
Add build and test workflow
1 parent 65c62de commit dbb235d

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Clone and Install"
2+
description: "Clones repository and sets up Node environment"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Check out repository
7+
uses: actions/checkout@v4
8+
9+
- name: Set up Node
10+
uses: actions/setup-node@v4
11+
with:
12+
node-version: '18.x'
13+
registry-url: 'https://registry.npmjs.org'
14+
15+
- name: Install dependencies
16+
run: npm install

.github/workflows/publish.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ jobs:
1111
name: Publish NPM Package
1212

1313
steps:
14-
- name: Cloning repo
15-
uses: actions/checkout@v4
14+
- name: Clone and Install
15+
uses: ./.github/actions/clone-install
1616

17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: '18.x'
20-
registry-url: 'https://registry.npmjs.org'
21-
22-
- run: npm i
2317
- run: npm run deploy
2418
env:
2519
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/pull-request.yaml renamed to .github/workflows/pull-request.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,8 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- name: Cloning repo
19-
uses: actions/checkout@v4
20-
21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: '18.x'
24-
registry-url: 'https://registry.npmjs.org'
25-
26-
- name: Install dependencies
27-
run: npm install
18+
- name: Clone and Install
19+
uses: ./.github/actions/clone-install
2820

2921
- name: Build
3022
run: npm run build

0 commit comments

Comments
 (0)