9292 distribution : " temurin"
9393
9494 - name : Set up Gradle
95- uses : gradle/actions/setup-gradle@v3
95+ uses : gradle/actions/setup-gradle@v4
9696
9797 - name : Set up signing key
9898 run : mkdir -p "$HOME/.gnupg" && echo -n "$KEY" | base64 -d > "$HOME/.gnupg/secring.gpg"
@@ -128,7 +128,7 @@ jobs:
128128 fail-fast : false
129129 matrix :
130130 include :
131- - runner : buildjet-2vcpu- ubuntu-1804
131+ - runner : ubuntu-latest
132132 os_family : linux
133133 arch : amd64
134134 - runner : macos-13
@@ -138,43 +138,45 @@ jobs:
138138 os_family : windows
139139 arch : amd64
140140 runs-on : ${{ matrix.runner }}
141- env :
142- # This is required to allow continuing usage of Node 16 for actions,
143- # as Node 20 won't run on the builder we use for linux builds
144- # (Node 20 require glibc 2.28+, but ubuntu-1804 has glibc 2.27).
145- # https://github.blog/changelog/2024-05-17-updated-dates-for-actions-runner-using-node20-instead-of-node16-by-default/
146- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
147141 steps :
148142 - name : Checkout repo
149- # FIXME: v4+ requires Node 20
150- uses : actions/checkout@v3
143+ uses : actions/checkout@v4
151144 with :
145+ submodules : recursive
152146 ref : ${{ env.INPUT_REF }}
153147
154148 # See comment on temporary tag above. tldr: this is a local tag; never
155149 # gets pushed
156150 - name : Temporary tag
157151 run : git tag "$INPUT_TAG"
158-
152+
159153 - name : Set up Java
160- # FIXME: v4+ requires Node 20
161- uses : actions/setup-java@v3
154+ if : matrix.os_family != 'Linux'
155+ uses : actions/setup-java@v4
162156 with :
163157 java-version : " 11"
164158 distribution : " temurin"
165159
166160 - name : Set up Gradle
167- # FIXME: v3+ requires Node 20
168- uses : gradle/gradle-build-action@v2
169-
170- - name : Build native test server
171- run : ./gradlew :temporal-test-server:build
161+ if : matrix.os_family != 'Linux'
162+ uses : gradle/actions/setup-gradle@v4
172163
164+ - name : Build native test server (non-Docker)
165+ if : matrix.os_family != 'Linux'
166+ run : |
167+ ./gradlew :temporal-test-server:build
168+
169+ - name : Build native test server (Docker)
170+ if : matrix.os_family == 'Linux'
171+ run : |
172+ docker run \
173+ --rm -w /github/workspace -v "$(pwd):/github/workspace" \
174+ $(docker build -q ./docker/native-image) \
175+ sh -c "./gradlew :temporal-test-server:build"
173176 # path ends in a wildcard because on windows the file ends in '.exe'
174177 # path excludes *.txt because native-image also writes a build manifest txt file
175178 - name : Upload executable to workflow
176- # FIXME: v4+ requires Node 20
177- uses : actions/upload-artifact@v3
179+ uses : actions/upload-artifact@v4
178180 with :
179181 name : ${{ matrix.os_family }}_${{ matrix.arch }}
180182 path : |
@@ -185,16 +187,15 @@ jobs:
185187
186188 attach_to_release :
187189 name : Attach native executables to release
188- needs : build_native_images
190+ needs : [ build_native_images, create_draft_release]
189191 runs-on : ubuntu-latest
190192 steps :
191193 - name : Audit gh version
192194 run : gh --version
193195
194196 # when no artifact is specified, all artifacts are downloaded and expanded into CWD
195197 - name : Fetch executables
196- # Need v3 here to stay compatible with the build_native_images job.
197- uses : actions/download-artifact@v3-node20
198+ uses : actions/download-artifact@v4
198199
199200 # example: linux_amd64/ -> temporal-test-server_1.2.3_linux_amd64
200201 # the name of the directory created becomes the basename of the archive (*.tar.gz or *.zip) and
0 commit comments