Skip to content

Commit 8d8334d

Browse files
committed
feat: diff package tarballs
1 parent 694aa5e commit 8d8334d

6 files changed

Lines changed: 438 additions & 127 deletions

File tree

.github/workflows/diff-dependencies.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,64 @@ on:
44
pull_request:
55

66
jobs:
7+
build-main:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
12+
with:
13+
ref: main
14+
- name: Use Node v${{ matrix.node-version }}
15+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
16+
with:
17+
node-version: 24.x
18+
- name: Install Dependencies
19+
run: npm ci
20+
- name: Build
21+
run: npm run build
22+
- name: Pack
23+
run: npm pack
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: base-packages
27+
path: '*.tgz'
28+
build-pr:
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
32+
- name: Use Node v${{ matrix.node-version }}
33+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
34+
with:
35+
node-version: 24.x
36+
- name: Install Dependencies
37+
run: npm ci
38+
- name: Build
39+
run: npm run build
40+
- name: Pack
41+
run: npm pack
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: source-packages
45+
path: '*.tgz'
746
diff_dependencies:
847
runs-on: ubuntu-latest
948
permissions:
1049
pull-requests: write
1150
steps:
51+
- uses: actions/download-artifact@v3
52+
with:
53+
name: base-packages
54+
path: ./base-packages
55+
- uses: actions/download-artifact@v3
56+
with:
57+
name: source-packages
58+
path: ./source-packages
1259
- name: Checkout repository
1360
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1461
with:
1562
fetch-depth: 0
1663
- name: Create Diff
1764
uses: ./
65+
with:
66+
base-packages: ./base-packages/*.tgz
67+
source-packages: ./source-packages/*.tgz

action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ inputs:
2626
description: 'Threshold (in bytes) for warning about significant increase in package size'
2727
required: false
2828
default: '100000'
29+
base-packages:
30+
description: 'Glob pattern for base branch pack files (e.g., "./base-packs/*.tgz")'
31+
required: false
32+
source-packages:
33+
description: 'Glob pattern for source branch pack files (e.g., "./source-packs/*.tgz")'
34+
required: false
35+
pack-size-threshold:
36+
description: 'Threshold (in bytes) for warning about significant increase in total pack size'
37+
required: false
38+
default: '50000'
2939

3040
runs:
3141
using: node24

0 commit comments

Comments
 (0)