[ci] Allow dry run (#34765)
Allow running the compiler release script as dry run.
lauren committed
Oct 7, 2025 at 14:44 UTC
69b4cb8df4d3c612f927942098475c7907c70808
3 files changed
+15
-1
.github/workflows/compiler_prereleases.yml
+10
-1
@@ -19,6 +19,9 @@ on:
19
tag_version:
20
required: false
21
type: string
22
+ dry_run:
23
+ required: false
24
+ type: boolean
25
secrets:
26
NPM_TOKEN:
27
required: true
@@ -55,7 +58,13 @@ jobs:
58
key: compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/yarn.lock') }}
59
- run: yarn install --frozen-lockfile
60
if: steps.node_modules.outputs.cache-hit != 'true'
58
- - name: Publish packages to npm
61
+ - if: inputs.dry_run == true
62
+ name: Publish packages to npm (dry run)
63
+ run: |
64
+ cp ./scripts/release/ci-npmrc ~/.npmrc
65
+ scripts/release/publish.js --ci --versionName=${{ inputs.version_name }} --tag=${{ inputs.dist_tag }} ${{ inputs.tag_version && format('--tagVersion={0}', inputs.tag_version) || '' }}
66
+ - if: inputs.dry_run != true
67
+ name: Publish packages to npm
68
run: |
69
cp ./scripts/release/ci-npmrc ~/.npmrc
70
scripts/release/publish.js --frfr --ci --versionName=${{ inputs.version_name }} --tag=${{ inputs.dist_tag }} ${{ inputs.tag_version && format('--tagVersion={0}', inputs.tag_version) || '' }}
.github/workflows/compiler_prereleases_manual.yml
+4
@@ -17,6 +17,9 @@ on:
17
tag_version:
18
required: false
19
type: string
20
+ dry_run:
21
+ required: false
22
+ type: boolean
23
24
permissions: {}
25
@@ -33,5 +36,6 @@ jobs:
36
dist_tag: ${{ inputs.dist_tag }}
37
version_name: ${{ inputs.version_name }}
38
tag_version: ${{ inputs.tag_version }}
39
+ dry_run: ${{ inputs.dry_run }}
40
secrets:
41
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
.github/workflows/compiler_prereleases_nightly.yml
+1
@@ -19,5 +19,6 @@ jobs:
19
release_channel: experimental
20
dist_tag: experimental
21
version_name: '0.0.0'
22
+ dry_run: false
23
secrets:
24
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}