Import @actions/artifact@v1 as artifact-legacy and v2 as artifact

This commit is contained in:
Angela P Wen
2024-09-04 14:06:01 -07:00
parent 889597e41d
commit cdcb85f97a
5233 changed files with 2173310 additions and 71354 deletions
+26
View File
@@ -0,0 +1,26 @@
'use strict';
// This example is used in the documentation.
// 1. const { parseArgs } = require('node:util'); // from node
// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package
const { parseArgs } = require('..'); // in repo
const args = ['-f', '--bar', 'b'];
const options = {
foo: {
type: 'boolean',
short: 'f'
},
bar: {
type: 'string'
}
};
const {
values,
positionals
} = parseArgs({ args, options });
console.log(values, positionals);
// Try the following:
// node simple-hard-coded.js