@@ -16,7 +16,58 @@ permissions:
1616 id-token : write
1717
1818jobs :
19+ verify-generated-project :
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ include :
24+ - os : ubuntu-latest
25+ gradle_command : ./gradlew
26+ - os : macos-latest
27+ gradle_command : ./gradlew
28+ - os : windows-latest
29+ gradle_command : .\gradlew.bat
30+ runs-on : ${{ matrix.os }}
31+
32+ steps :
33+ - uses : actions/checkout@v4
34+ with :
35+ fetch-depth : 0
36+ token : ${{ secrets.GITHUB_TOKEN }}
37+ ref : ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
38+
39+ - run : git fetch --tags -f
40+
41+ - name : Set up Node.js
42+ uses : actions/setup-node@v4
43+ with :
44+ node-version : ' 20'
45+
46+ - name : Set up JDK 17
47+ uses : actions/setup-java@v5
48+ with :
49+ java-version : ' 17'
50+ distribution : ' temurin'
51+ token : ${{ github.token }}
52+
53+ - name : Cache Gradle packages
54+ uses : actions/cache@v4
55+ with :
56+ path : |
57+ ~/.gradle/caches
58+ ~/.gradle/wrapper
59+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
60+ restore-keys : |
61+ ${{ runner.os }}-gradle-
62+
63+ - name : Run formatting, unit tests, and integration tests
64+ run : ${{ matrix.gradle_command }} spotlessCheck test integrationTest --no-daemon
65+
66+ - name : Check npm package
67+ run : ${{ matrix.gradle_command }} npmPackageCheck --no-daemon
68+
1969 prepare :
70+ needs : verify-generated-project
2071 runs-on : ubuntu-latest
2172 steps :
2273 - uses : actions/checkout@v4
@@ -69,19 +120,19 @@ jobs:
69120 echo "$CHANGELOG_CONTENT" >> $GITHUB_ENV
70121 echo "EOF" >> $GITHUB_ENV
71122
72- - name : Set up JDK 17
73- uses : actions/setup-java@v5
74- with :
75- java-version : ' 17'
76- distribution : ' temurin'
77-
78123 - name : Set up Node.js
79124 uses : actions/setup-node@v6
80125 with :
81126 node-version : ' 24'
82127 registry-url : ' https://registry.npmjs.org'
83128 package-manager-cache : false
84129
130+ - name : Set up JDK 17
131+ uses : actions/setup-java@v5
132+ with :
133+ java-version : ' 17'
134+ distribution : ' temurin'
135+
85136 - name : Cache Gradle packages
86137 uses : actions/cache@v4
87138 with :
@@ -92,12 +143,6 @@ jobs:
92143 restore-keys : |
93144 ${{ runner.os }}-gradle-
94145
95- - name : Run product checks
96- run : ./gradlew spotlessCheck test integrationTest --no-daemon
97-
98- - name : Check npm package
99- run : ./gradlew npmPackageCheck --no-daemon
100-
101146 - name : Publish npm package
102147 run : npm publish cli/build/npm/package --access public
103148
0 commit comments