Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 4923461

Browse files
[skip ci] fix build logic
1 parent 8317dc4 commit 4923461

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
COMPILER_NIGHTLY: ${{ github.event_name == 'schedule' }}
2525
FORCE_COLOR: '1'
2626
steps:
27-
- name: Switch Commit
28-
run: git fetch --tags && git checkout --recurse-submodules ${{ inputs.release-tag }}
29-
if: ${{ inputs.release-tag != '' }}
3027
- name: Setup Java
3128
uses: actions/setup-java@v4
3229
with:
@@ -46,6 +43,7 @@ jobs:
4643
- uses: actions/checkout@v4
4744
with:
4845
submodules: recursive
46+
ref: ${{ inputs.release-tag || '' }}
4947
- name: Fetch submodule tags
5048
working-directory: compiler
5149
run: git fetch --tags https://github.com/google/closure-compiler.git
@@ -99,9 +97,6 @@ jobs:
9997
NODE_VERSION: '20.x'
10098
FORCE_COLOR: '1'
10199
steps:
102-
- name: Switch Commit
103-
run: git fetch --tags && git checkout --recurse-submodules ${{ inputs.release-tag }}
104-
if: ${{ inputs.release-tag != '' }}
105100
- name: Setup Java
106101
uses: actions/setup-java@v4
107102
with:
@@ -110,6 +105,8 @@ jobs:
110105
java-package: jdk
111106
architecture: x64
112107
- uses: actions/checkout@v4
108+
with:
109+
ref: ${{ inputs.release-tag || '' }}
113110
- name: Use Node.js ${{ env.NODE_VERSION }}
114111
uses: actions/setup-node@v4
115112
with:
@@ -178,9 +175,6 @@ jobs:
178175
NODE_VERSION: '20.x'
179176
FORCE_COLOR: '1'
180177
steps:
181-
- name: Switch Commit
182-
run: git fetch --tags && git checkout --recurse-submodules ${{ inputs.release-tag }}
183-
if: ${{ inputs.release-tag != '' }}
184178
- name: Setup Java
185179
uses: actions/setup-java@v4
186180
with:
@@ -189,6 +183,8 @@ jobs:
189183
java-package: jdk
190184
architecture: x64
191185
- uses: actions/checkout@v4
186+
with:
187+
ref: ${{ inputs.release-tag || '' }}
192188
- name: Use Node.js ${{ env.NODE_VERSION }}
193189
uses: actions/setup-node@v4
194190
with:
@@ -255,9 +251,6 @@ jobs:
255251
NODE_VERSION: '22.x'
256252
FORCE_COLOR: '1'
257253
steps:
258-
- name: Switch Commit
259-
run: git fetch --tags && git checkout --recurse-submodules ${{ inputs.release-tag }}
260-
if: ${{ inputs.release-tag != '' }}
261254
- name: Setup Java
262255
uses: actions/setup-java@v4
263256
with:
@@ -266,6 +259,8 @@ jobs:
266259
java-package: jdk
267260
architecture: x64
268261
- uses: actions/checkout@v4
262+
with:
263+
ref: ${{ inputs.release-tag || '' }}
269264
- name: Use Node.js ${{ env.NODE_VERSION }}
270265
uses: actions/setup-node@v4
271266
with:
@@ -329,9 +324,6 @@ jobs:
329324
NODE_VERSION: '22.x'
330325
FORCE_COLOR: '1'
331326
steps:
332-
- name: Switch Commit
333-
run: git fetch --tags && git checkout --recurse-submodules ${{ inputs.release-tag }}
334-
if: ${{ inputs.release-tag != '' }}
335327
- name: Setup Java
336328
uses: actions/setup-java@v4
337329
with:
@@ -340,6 +332,8 @@ jobs:
340332
java-package: jdk
341333
architecture: x64
342334
- uses: actions/checkout@v4
335+
with:
336+
ref: ${{ inputs.release-tag || '' }}
343337
- name: Use Node.js ${{ env.NODE_VERSION }}
344338
uses: actions/setup-node@v4
345339
with:
@@ -410,10 +404,9 @@ jobs:
410404
- build-macos
411405
- build-windows
412406
steps:
413-
- name: Switch Commit
414-
run: git fetch --tags && git checkout --recurse-submodules ${{ inputs.release-tag }}
415-
if: ${{ inputs.release-tag != '' }}
416407
- uses: actions/checkout@v4
408+
with:
409+
ref: ${{ inputs.release-tag || '' }}
417410
- name: Use Node.js ${{ env.NODE_VERSION }}
418411
uses: actions/setup-node@v4
419412
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
https://api.github.com/repos/google/closure-compiler-npm/releases \
4848
-d '{"tag_name":"v${{ github.event.inputs.COMPILER_VERSION_NUMBER }}.0.0","name":"${{ github.event.inputs.COMPILER_VERSION_NUMBER }}.0.0","body":"Closure-compiler ${{ github.event.inputs.COMPILER_VERSION_NUMBER }} release","draft":false,"prerelease":false,"generate_release_notes":true}'
4949
50-
call-build-workflow:
50+
build:
5151
needs: create-release
5252
uses: ./.github/workflows/build.yml
5353
with:

0 commit comments

Comments
 (0)