diff --git a/src/common.ts b/src/common.ts index 7d55302a..8aec4516 100644 --- a/src/common.ts +++ b/src/common.ts @@ -589,6 +589,17 @@ export function getRules(configuration: Configuration): Rules { 'node_modules', ], }, + build: { + stage: 'build', + script: [ + 'npm run build', + ], + artifacts: { + paths: [ + 'lib', + ], + }, + }, audit: { allow_failure: true, except: [ @@ -608,6 +619,27 @@ export function getRules(configuration: Configuration): Rules { ], stage: 'test', }, + package: { + dependencies: [ + 'build', + ], + tags: [ + 'secrecy', + ], + stage: 'deploy', + script: [ + 'echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > /root/.npmrc', + 'npm publish', + ], + only: [ + '/^v[0-9]+\.[0-9]+\.[0-9]+$/', + ], + artifacts: { + paths: [ + 'public', + ], + }, + }, pages: { artifacts: { 'paths': [