Merge pull request #1608 from actions/robherley/artifact-client-import

Update artifact module quick start
This commit is contained in:
Rob Herley 2023-12-14 15:46:14 -05:00 committed by GitHub
commit 68f22927e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,10 +63,16 @@ Import the module:
```js
// ES6 module
import artifact from '@actions/artifact'
import {DefaultArtifactClient} from '@actions/artifact'
// CommonJS
const {default: artifact} = require('@actions/artifact')
const {DefaultArtifactClient} = require('@actions/artifact')
```
Then instantiate:
```js
const artifact = new DefaultArtifactClient()
```
For a comprehensive list of classes, interfaces, functions and more, see the [generated documentation](./docs/generated/README.md).