Skip to content

Commit 2302cbd

Browse files
committed
build: make start and end pkg index configurable and update workflow
1 parent 8c7185f commit 2302cbd

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/standalone_publish.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ name: standalone_publish
2323
on:
2424
# Allow the workflow to be manually run:
2525
workflow_dispatch:
26+
inputs:
27+
release-type:
28+
type: choice
29+
description: 'Type of release to create'
30+
default: 'none'
31+
options:
32+
- none
33+
- patch
34+
- minor
35+
- major
36+
dry-run:
37+
type: boolean
38+
description: 'Skip uploading packages (dry run):'
39+
default: false
40+
start-index:
41+
type: number
42+
description: 'Index of first package to publish'
43+
default: 0
44+
end-index:
45+
type: number
46+
description: 'Index of last package to publish'
47+
default: 9999
2648

2749
# Workflow concurrency group:
2850
concurrency:
@@ -84,7 +106,7 @@ jobs:
84106
# Save NPM_TOKEN to user's .npmrc:
85107
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
86108
87-
node lib/node_modules/@stdlib/_tools/scripts/publish_packages.js --patch --skip-toplevel
109+
node lib/node_modules/@stdlib/_tools/scripts/publish_packages.js --skip-toplevel --release-type=${{ github.event.inputs.release-type }} --start-index=${{ github.event.inputs.start-index }} --end-index=${{ github.event.inputs.end-index }} ${{ github.event.inputs.dry-run == 'true' && '--skip-upload ' || '' }}
88110
89111
# Archive list of to be published packages:
90112
- name: 'Archive package list'

lib/node_modules/@stdlib/_tools/scripts/publish_packages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ var args = cli.args();
6868

6969
var debug = logger( 'scripts:publish-packages' );
7070

71-
var START_PKG_INDEX = 0;
72-
var END_PKG_INDEX = 5000;
71+
var START_PKG_INDEX = parseInt( flags[ 'start-index' ], 10 ) || 0;
72+
var END_PKG_INDEX = ( flags[ 'end-index' ] === void 0 ) ? 9999 : parseInt( flags[ 'end-index' ], 10 );
7373
var MAX_TREE_DEPTH = 99;
7474

7575
var topics = setTopics.factory( {

0 commit comments

Comments
 (0)