Skip to content

Commit c0a4192

Browse files
committed
Remove extra archive step and make builds available uncompressed
1 parent 36051b8 commit c0a4192

1 file changed

Lines changed: 21 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,13 @@ jobs:
575575
- name: Build dist/
576576
run: npm run build
577577

578+
# Upload library uncompressed to allow for testing in REPLs
579+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
580+
with:
581+
retention-days: 7
582+
archive: false
583+
path: dist/plotly.js
584+
578585
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
579586
with:
580587
name: dist-node18
@@ -588,18 +595,6 @@ jobs:
588595
if: github.ref == 'refs/heads/master'
589596
run: git --no-pager diff tags/$(git describe --tags --abbrev=0) dist/plot-schema.json || true
590597

591-
- name: Pack tarball
592-
run: |
593-
npm pack
594-
version=$(node --eval "console.log(require('./package.json').version)")
595-
mv plotly.js-$version.tgz plotly.js.tgz
596-
597-
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
598-
with:
599-
name: tarball-node18
600-
retention-days: 7
601-
path: plotly.js.tgz
602-
603598
- name: Test plot-schema.json diff
604599
run: diff --unified --color dist/plot-schema.json test/plot-schema.json
605600

@@ -632,6 +627,20 @@ jobs:
632627

633628
- name: Build dist/
634629
run: npm run build
630+
631+
# This is necessary to avoid a naming collision with the upload from the Node 18 build
632+
- name: Copy library for upload
633+
run: cp dist/plotly.js dist/plotly.node22.js
634+
635+
# Upload library uncompressed to allow for testing in REPLs
636+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
637+
with:
638+
retention-days: 7
639+
archive: false
640+
path: dist/plotly.node22.js
641+
642+
- name: Remove copy of library
643+
run: rm dist/plotly.node22.js
635644

636645
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
637646
with:
@@ -646,18 +655,6 @@ jobs:
646655
if: github.ref == 'refs/heads/master'
647656
run: git --no-pager diff tags/$(git describe --tags --abbrev=0) dist/plot-schema.json || true
648657

649-
- name: Pack tarball
650-
run: |
651-
npm pack
652-
version=$(node --eval "console.log(require('./package.json').version)")
653-
mv plotly.js-$version.tgz plotly.js.tgz
654-
655-
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
656-
with:
657-
name: tarball-node22
658-
retention-days: 7
659-
path: plotly.js.tgz
660-
661658
- name: Test plot-schema.json diff
662659
run: diff --unified --color dist/plot-schema.json test/plot-schema.json
663660

0 commit comments

Comments
 (0)