Skip to content

Commit 773f001

Browse files
authored
chore(ci): add evg secrets for publish workflow; add manual dispatch; fix upload fn arguments (#3332)
1 parent 6c89a76 commit 773f001

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/publish-compass.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
name: Publish Compass
33

44
on:
5+
workflow_dispatch:
6+
inputs:
7+
dryRun:
8+
description: 'Run publish in dry-run mode (WARN: think twice when changing this value, this will override currently published manifest in download center!)'
9+
required: true
10+
default: 'true'
511
release:
612
types: [published]
713

@@ -16,7 +22,7 @@ jobs:
1622
- name: Setup Node.js Environment
1723
uses: actions/setup-node@v2
1824
with:
19-
node-version: ^14.17.5
25+
node-version: ^16.15.1
2026
cache: 'npm'
2127

2228
- name: Install npm@8
@@ -31,5 +37,11 @@ jobs:
3137
- name: Upload updated download center manifest
3238
env:
3339
DEBUG: 'hadron*,mongo*,compass*'
40+
DOWNLOAD_CENTER_AWS_ACCESS_KEY_ID: ${{ secrets.DOWNLOAD_CENTER_AWS_ACCESS_KEY_ID }}
41+
DOWNLOAD_CENTER_AWS_SECRET_ACCESS_KEY: ${{ secrets.DOWNLOAD_CENTER_AWS_SECRET_ACCESS_KEY }}
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3443
run: |
44+
if [[ "${{ github.event.inputs.dryRun }}" == "true" ]]; then
45+
export npm_config_dry_run=true
46+
fi
3547
npm run --workspace mongodb-compass upload -- --manifest

packages/hadron-build/commands/upload.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,7 @@ const handler = function handler(argv) {
420420
}
421421

422422
if (argv.manifest) {
423-
updateManifest(assets, argv.version, channel, argv.dryRun).catch(
424-
abortIfError
425-
);
423+
updateManifest(argv.dryRun).catch(abortIfError);
426424
return;
427425
}
428426

0 commit comments

Comments
 (0)