File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,26 @@ inputs:
21
21
Runs a steps that prepare artifacts for release the app to NPM. These
22
22
artifacts are later used by, `prepare-x-plat-npm-tarball-mode`
23
23
required : false
24
+ artifact-ids :
25
+ description :
26
+ Provide IDs of artifacts created in the prepare-npm-artifacts-mode step.
27
+ Accepts an array
28
+ outputs :
29
+ darwin-arm64 :
30
+ description :
31
+ Artifact IDs of the tarball darwin-arm64 created by
32
+ prepare-npm-artifacts-mode
33
+ darwin-x64 :
34
+ description :
35
+ Artifact ID of the darwin-x64 tarball created by
36
+ prepare-npm-artifacts-mode
37
+ linux-x64 :
38
+ description :
39
+ Artifact ID of the linux-x64 tarball created by prepare-npm-artifacts-mode
40
+ windows-x64 :
41
+ description :
42
+ Artifact ID of the windows-x64 tarball created by
43
+ prepare-npm-artifacts-mode
24
44
runs :
25
45
using : node20
26
46
main : dist/index.js
Original file line number Diff line number Diff line change @@ -180739,6 +180739,8 @@ const cacheKey = core.getInput("cache-key");
180739
180739
const sourceCacheKey = core.getInput("source-cache-key");
180740
180740
const manifestKey = core.getInput("manifest");
180741
180741
const prepareNPMArtifactsMode = core.getInput("prepare-npm-artifacts-mode");
180742
+ const bundleNPMArtifactsMode = core.getInput("bundle-npm-artifacts-mode");
180743
+ const artifactIDs = core.getInput("artifact-ids");
180742
180744
function run(name, command, args) {
180743
180745
return __awaiter(this, void 0, void 0, function* () {
180744
180746
const PATH = process.env.PATH ? process.env.PATH : "";
@@ -180842,6 +180844,7 @@ function prepareNPMArtifacts() {
180842
180844
// if unspecified, defaults to repository/org retention settings (the limit of this value)
180843
180845
retentionDays: 10,
180844
180846
});
180847
+ core.setOutput(`${index_platform}-${arch}`, `${id}`);
180845
180848
console.log(`Created artifact with id: ${id} (bytes: ${size}`);
180846
180849
}
180847
180850
catch (error) {
@@ -180854,9 +180857,15 @@ function prepareNPMArtifacts() {
180854
180857
}
180855
180858
});
180856
180859
}
180860
+ function bundleNPMArtifacts() {
180861
+ console.log(artifactIDs);
180862
+ }
180857
180863
if (prepareNPMArtifactsMode) {
180858
180864
prepareNPMArtifacts();
180859
180865
}
180866
+ else if (bundleNPMArtifactsMode) {
180867
+ bundleNPMArtifacts();
180868
+ }
180860
180869
else {
180861
180870
main();
180862
180871
}
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const cacheKey = core.getInput("cache-key");
15
15
const sourceCacheKey = core . getInput ( "source-cache-key" ) ;
16
16
const manifestKey = core . getInput ( "manifest" ) ;
17
17
const prepareNPMArtifactsMode = core . getInput ( "prepare-npm-artifacts-mode" ) ;
18
+ const bundleNPMArtifactsMode = core . getInput ( "bundle-npm-artifacts-mode" ) ;
19
+ const artifactIDs = core . getInput ( "artifact-ids" ) ;
18
20
19
21
async function run ( name : string , command : string , args : string [ ] ) {
20
22
const PATH = process . env . PATH ? process . env . PATH : "" ;
@@ -146,6 +148,7 @@ async function prepareNPMArtifacts() {
146
148
}
147
149
) ;
148
150
151
+ core . setOutput ( `${ platform } -${ arch } ` , `${ id } ` ) ;
149
152
console . log ( `Created artifact with id: ${ id } (bytes: ${ size } ` ) ;
150
153
} catch ( error ) {
151
154
if ( error instanceof Error ) {
@@ -156,8 +159,14 @@ async function prepareNPMArtifacts() {
156
159
}
157
160
}
158
161
162
+ function bundleNPMArtifacts ( ) {
163
+ console . log ( artifactIDs ) ;
164
+ }
165
+
159
166
if ( prepareNPMArtifactsMode ) {
160
167
prepareNPMArtifacts ( ) ;
168
+ } else if ( bundleNPMArtifactsMode ) {
169
+ bundleNPMArtifacts ( ) ;
161
170
} else {
162
171
main ( ) ;
163
172
}
You can’t perform that action at this time.
0 commit comments