Upload/download package artifacts to AWS
npx aws-artifacts
In package.json
add section aws-artifacts
"aws-artifacts": {
"credentials": {
"accessKeyId": "AKIA...",
"secretAccessKey": "Dw+Y..."
},
"region": "eu-west-1",
"bucket": "bucket-for-tests",
"prefix": "",
// list files to upload/download
"root": "",
"files": "dist/*.zip"
}
-
credentials
- AWS access credentials -
region
,bucket
- target bucket -
prefix
- optional prefix path for artifacts in bucket, by default is set topackageName/packageVersion/
-
root
-cwd
for listed files (all relative paths for files will be preserved), by default is set to directory ofpackage.json
-
files
- files to upload
Add to package.json
in scripts
section:
"postinstall": "npx --package=@linked-helper/framework.build-tools.aws-artifacts aws-artifacts postinstall"
if electron-builder
is used:
"build": {
...
// upload artifacts
"afterAllArtifactBuild": "@linked-helper/framework.build-tools.aws-artifacts/dist/afterAllArtifactBuild",
...
}
or just exec npx aws-artifacts upload
after building
to see all options: npx aws-artifacts --help