@@ -65,27 +65,43 @@ async function uploadArtifacts() {
6565 return ;
6666 }
6767
68- console . log (
69- `Uploading ${
70- assets . length
71- } release assets for ${ releaseVersion } to S3 under '${ bucketPath } '`
72- ) ;
73-
74- await uploadToS3 (
75- process . env . ATOM_RELEASES_S3_KEY ,
76- process . env . ATOM_RELEASES_S3_SECRET ,
77- process . env . ATOM_RELEASES_S3_BUCKET ,
78- bucketPath ,
79- assets
80- ) ;
68+ if (
69+ process . env . ATOM_RELEASES_S3_KEY &&
70+ process . env . ATOM_RELEASES_S3_SECRET &&
71+ process . env . ATOM_RELEASES_S3_BUCKET
72+ ) {
73+ console . log (
74+ `Uploading ${
75+ assets . length
76+ } release assets for ${ releaseVersion } to S3 under '${ bucketPath } '`
77+ ) ;
8178
82- if ( argv . linuxRepoName ) {
83- await uploadLinuxPackages (
84- argv . linuxRepoName ,
85- process . env . PACKAGE_CLOUD_API_KEY ,
86- releaseVersion ,
79+ await uploadToS3 (
80+ process . env . ATOM_RELEASES_S3_KEY ,
81+ process . env . ATOM_RELEASES_S3_SECRET ,
82+ process . env . ATOM_RELEASES_S3_BUCKET ,
83+ bucketPath ,
8784 assets
8885 ) ;
86+ } else {
87+ console . log (
88+ '\nEnvironment variables "ATOM_RELEASES_S3_BUCKET", "ATOM_RELEASES_S3_KEY" and/or "ATOM_RELEASES_S3_SECRET" are not set, skipping S3 upload.'
89+ ) ;
90+ }
91+
92+ if ( argv . linuxRepoName ) {
93+ if ( process . env . PACKAGE_CLOUD_API_KEY ) {
94+ await uploadLinuxPackages (
95+ argv . linuxRepoName ,
96+ process . env . PACKAGE_CLOUD_API_KEY ,
97+ releaseVersion ,
98+ assets
99+ ) ;
100+ } else {
101+ console . log (
102+ '\nEnvironment variable "PACKAGE_CLOUD_API_KEY" is not set, skipping PackageCloud upload.'
103+ ) ;
104+ }
89105 } else {
90106 console . log (
91107 '\nNo Linux package repo name specified, skipping Linux package upload.'
0 commit comments