-
-
Notifications
You must be signed in to change notification settings - Fork 10
570 lines (534 loc) · 21.9 KB
/
Copy pathbuild-native-zstd.yaml
File metadata and controls
570 lines (534 loc) · 21.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
name: Build-Native-ZSTD
# Follow Zstandard latest release by cron update
# 1. Check for Zstandard updates - compare submodule commit ID with latest release commit
# 2. If no changes, checkout in each build job, build and upload artifacts.
# 2". If changes exist, update submodule after checkout in each build job, build and upload artifacts
# 3. Upload packages to GitHub Actions summary
# 4. If changes exist, Create a branch and PR. Separate PRs for each Zstandard release are preferred (avoid updating in a single PR)
# PR includes following changes.
# - Commit that updates the submodule
# - Commit that zstd dynamic lib artifacts placed in src/NativeCompressions.Zstandard.Runtime/runtimes/{platform_name}/native/{lib}
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *" # Every day at 3:00 AM (UTC)
jobs:
check_new_release:
permissions:
contents: read
uses: ./.github/workflows/check-new-release.yaml
with:
repository: facebook/zstd
submodule_path: zstd
build-windows:
needs: [check_new_release]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
arch: [x64]
include:
- arch: x64
platform: x64
msys_env: MINGW64
permissions:
contents: read
runs-on: windows-2025
timeout-minutes: 5
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
fetch-depth: 1
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
cd zstd
git fetch --tags
git checkout ${{ needs.check_new_release.outputs.latest_tag }}
cd ..
echo "Updated zstd submodule to ${{ needs.check_new_release.outputs.latest_tag }}"
- name: Setup MSYS2
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
msystem: ${{ matrix.msys_env }}
update: true
install: >-
${{ matrix.arch == 'x64' && 'mingw-w64-x86_64-gcc mingw-w64-x86_64-make' || 'mingw-w64-clang-aarch64-gcc mingw-w64-clang-aarch64-make' }}
make
# Windows lib-mt-release build not apply -DZSTD_MULTITHREAD, so use lib-release instead + `MOREFLAGS="-DZSTD_MULTITHREAD -flto"`
# `-fPIC` is not needed on Windows
- name: Build DLL
shell: msys2 {0}
run: |
cd zstd/lib
make lib-release TARGET_SYSTEM=Windows CC=gcc MOREFLAGS="-DZSTD_MULTITHREAD" -j "$(nproc)"
- name: Prepare artifacts
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path "artifacts/win-${{ matrix.arch }}"
Copy-Item "zstd/lib/dll/*.dll" -Destination "artifacts/win-${{ matrix.arch }}/libzstd.dll"
- name: Upload Windows artifacts
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-win-${{ matrix.arch }}
path: artifacts/win-${{ matrix.arch }}/*
build-windows-arm64:
needs: [check_new_release]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
cd zstd
git fetch --tags
git checkout ${{ needs.check_new_release.outputs.latest_tag }}
cd ..
echo "Updated zstd submodule to ${{ needs.check_new_release.outputs.latest_tag }}"
# Windows lib-mt-release build not apply -DZSTD_MULTITHREAD, so use lib-release instead + `MOREFLAGS="-DZSTD_MULTITHREAD -flto"`
# `-fPIC` is not needed on Windows
- name: Build using Docker
run: |
docker run --rm -v "$PWD:/work" \
mstorsjo/llvm-mingw:latest \
bash -c "cd /work/zstd/lib && \
make lib-release TARGET_SYSTEM=Windows CC=aarch64-w64-mingw32-gcc MOREFLAGS='-DZSTD_MULTITHREAD'"
file zstd/lib/dll/libzstd.dll
- name: Prepare artifacts
run: |
mkdir -p artifacts/win-arm64
cp zstd/lib/dll/libzstd.dll artifacts/win-arm64/
- name: Upload artifacts
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-win-arm64
path: artifacts/win-arm64/*
build-linux:
needs: [check_new_release]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
runs-on: ubuntu-24.04
timeout-minutes: 5
strategy:
matrix:
arch: [x64, arm64]
include:
- arch: x64
cc: gcc
- arch: arm64
cc: aarch64-linux-gnu-gcc
packages: gcc-aarch64-linux-gnu
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
fetch-depth: 1
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
cd zstd
git fetch --tags
git checkout ${{ needs.check_new_release.outputs.latest_tag }}
cd ..
echo "Updated zstd submodule to ${{ needs.check_new_release.outputs.latest_tag }}"
- name: Install ARM64 cross-compiler
if: ${{ matrix.arch == 'arm64' }}
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Build shared library
run: |
cd zstd/lib
make lib-release CC="${{ matrix.cc }}" MOREFLAGS="-DZSTD_MULTITHREAD -fPIC -flto" -j "$(nproc)"
ls -la ./*.so*
file libzstd.so*
- name: Prepare artifacts
run: |
mkdir -p artifacts/linux-${{ matrix.arch }}
cp zstd/lib/libzstd.so* artifacts/linux-${{ matrix.arch }}/
cd artifacts/linux-${{ matrix.arch }}
if [ -L libzstd.so ]; then
cp -L libzstd.so libzstd.so.tmp
mv libzstd.so.tmp libzstd.so
fi
- name: Upload Linux artifacts
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-linux-${{ matrix.arch }}
path: artifacts/linux-${{ matrix.arch }}/*
build-macos:
needs: [check_new_release]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
strategy:
matrix:
arch: [x64, arm64]
include:
- arch: x64
flags: "-arch x86_64"
- arch: arm64
flags: "-arch arm64"
runs-on: macos-15
timeout-minutes: 5
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
cd zstd
git fetch --tags
git checkout ${{ needs.check_new_release.outputs.latest_tag }}
cd ..
echo "Updated zstd submodule to ${{ needs.check_new_release.outputs.latest_tag }}"
- name: Build dynamic library
run: |
cd zstd/lib
make lib-release MOREFLAGS="-DZSTD_MULTITHREAD ${{ matrix.flags }} -fPIC -flto" -j "$(sysctl -n hw.ncpu)"
lipo -info ./*.dylib
- name: Prepare artifacts
run: |
mkdir -p artifacts/osx-${{ matrix.arch }}
cp zstd/lib/*.dylib artifacts/osx-${{ matrix.arch }}/
cd artifacts/osx-${{ matrix.arch }}
for file in *.dylib; do
if [ -L "$file" ]; then
cp -L "$file" "$file.tmp"
mv "$file.tmp" "$file"
fi
done
- name: Upload artifacts
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-osx-${{ matrix.arch }}
path: artifacts/osx-${{ matrix.arch }}/*
build-ios:
needs: [check_new_release]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
runs-on: macos-15
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
arch: [arm64, x86_64]
include:
- arch: arm64
sdk: iphoneos
target: aarch64-apple-ios11.0
flags: "-arch arm64 -mios-version-min=11.0"
- arch: x86_64
sdk: iphonesimulator
target: x86_64-apple-ios11.0-simulator
flags: "-arch x86_64 -mios-simulator-version-min=11.0"
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
fetch-depth: 1
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
cd zstd
git fetch --tags
git checkout ${{ needs.check_new_release.outputs.latest_tag }}
cd ..
echo "Updated zstd submodule to ${{ needs.check_new_release.outputs.latest_tag }}"
# `lib-release + -DZSTD_MULTITHREAD` build single-threaded static lib, so use `lib-mt + -O3` instead
# -fPIC is not needed on static library
- name: Build static library for iOS
run: |
SDK_PATH=$(xcrun --sdk ${{ matrix.sdk }} --show-sdk-path)
# Build static library (iOS App Store requires static linking)
cd zstd/lib
make lib-mt CC="clang" CFLAGS="-O3 ${{ matrix.flags }} -flto -isysroot $SDK_PATH" DEBUGFLAGS="" -j "$(sysctl -n hw.ncpu)"
ls -la libzstd.a
file libzstd.a
lipo -info libzstd.a
- name: Prepare artifacts
run: |
mkdir -p artifacts/ios-${{ matrix.arch }}
cp zstd/lib/libzstd.a artifacts/ios-${{ matrix.arch }}/
- name: Upload iOS artifacts
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-ios-${{ matrix.arch }}
path: artifacts/ios-${{ matrix.arch }}/*
build-android:
needs: [check_new_release]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
abi: [armeabi-v7a, arm64-v8a, x86_64]
include:
- abi: armeabi-v7a
arch: arm # Unity require this for mobile app
target: armv7a-linux-androideabi21
cc: armv7a-linux-androideabi21-clang
- abi: arm64-v8a
arch: arm64 # Most mobile app
target: aarch64-linux-android21
cc: aarch64-linux-android21-clang
- abi: x86_64
arch: x86_64 # Chromebook and Google Play for PC (not emulation)
target: x86_64-linux-android21
cc: x86_64-linux-android21-clang
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
fetch-depth: 1
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
cd zstd
git fetch --tags
git checkout ${{ needs.check_new_release.outputs.latest_tag }}
cd ..
echo "Updated zstd submodule to ${{ needs.check_new_release.outputs.latest_tag }}"
- name: Setup Android NDK
uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0
id: setup-ndk
with:
ndk-version: r26d
add-to-path: false
- name: Build shared library for Android
run: |
export PATH="${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH"
cd zstd/lib
make lib-release CC="${{ matrix.cc }}" MOREFLAGS="-DZSTD_MULTITHREAD -fPIC -flto" -j "$(nproc)"
ls -la libzstd.so*
file libzstd.so*
- name: Prepare artifacts
run: |
mkdir -p artifacts/android-${{ matrix.arch }}
cp zstd/lib/libzstd.so artifacts/android-${{ matrix.arch }}/
- name: Upload Android artifacts
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-android-${{ matrix.arch }}
path: artifacts/android-${{ matrix.arch }}/*
package-all:
needs:
[
check_new_release,
build-windows,
build-windows-arm64,
build-linux,
build-macos,
build-ios,
build-android,
]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: write
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Download all artifacts
uses: Cysharp/Actions/.github/actions/download-artifact@main
with:
path: artifacts
- name: Create .NET runtime structure
run: |
mkdir -p release/runtimes/{win-x64,win-arm64}/native
mkdir -p release/runtimes/{linux-x64,linux-arm64}/native
mkdir -p release/runtimes/{osx-x64,osx-arm64}/native
mkdir -p release/runtimes/{android-arm,android-arm64,android-x64}/native
mkdir -p release/runtimes/{ios-arm64,ios-x64}/native
# Windows
if [ -f artifacts/zstd-win-x64/libzstd.dll ]; then
cp -f artifacts/zstd-win-x64/libzstd.dll release/runtimes/win-x64/native/libzstd.dll
fi
if [ -f artifacts/zstd-win-arm64/libzstd.dll ]; then
cp -f artifacts/zstd-win-arm64/libzstd.dll release/runtimes/win-arm64/native/libzstd.dll
fi
# Linux
if [ -f artifacts/zstd-linux-x64/libzstd.so ]; then
cp artifacts/zstd-linux-x64/libzstd.so release/runtimes/linux-x64/native/
fi
if [ -f artifacts/zstd-linux-arm64/libzstd.so ]; then
cp artifacts/zstd-linux-arm64/libzstd.so release/runtimes/linux-arm64/native/
fi
# macOS
for file in artifacts/zstd-osx-x64/*.dylib; do
[ -f "$file" ] && cp "$file" release/runtimes/osx-x64/native/libzstd.dylib && break
done
for file in artifacts/zstd-osx-arm64/*.dylib; do
[ -f "$file" ] && cp "$file" release/runtimes/osx-arm64/native/libzstd.dylib && break
done
# iOS
if [ -f artifacts/zstd-ios-arm64/libzstd.a ]; then
cp artifacts/zstd-ios-arm64/libzstd.a release/runtimes/ios-arm64/native/
fi
if [ -f artifacts/zstd-ios-x86_64/libzstd.a ]; then
cp artifacts/zstd-ios-x86_64/libzstd.a release/runtimes/ios-x64/native/
fi
# Android
if [ -f artifacts/zstd-android-arm/libzstd.so ]; then
cp artifacts/zstd-android-arm/libzstd.so release/runtimes/android-arm/native/
fi
if [ -f artifacts/zstd-android-arm64/libzstd.so ]; then
cp artifacts/zstd-android-arm64/libzstd.so release/runtimes/android-arm64/native/
fi
if [ -f artifacts/zstd-android-x86_64/libzstd.so ]; then
cp artifacts/zstd-android-x86_64/libzstd.so release/runtimes/android-x64/native/
fi
- name: Create archives
run: |
cd release
tar czf ../zstd-native-libraries.tar.gz .
zip -r ../zstd-native-libraries.zip .
- name: Upload package
uses: Cysharp/Actions/.github/actions/upload-artifact@main
with:
name: zstd-native-package
path: |
zstd-native-libraries.tar.gz
create-pr:
needs: [check_new_release, package-all]
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
permissions:
contents: write
pull-requests: write
env:
NEW_BRANCH_NAME: "automate/zstd-${{ needs.check_new_release.outputs.latest_tag }}"
LATEST_TAG: ${{ needs.check_new_release.outputs.latest_tag }}
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: Cysharp/Actions/.github/actions/checkout@main
with:
submodules: recursive
- name: Configure Git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Create new branch
run: git checkout -b "${NEW_BRANCH_NAME}"
# update submodule
- name: Update submodule to latest release
if: ${{ needs.check_new_release.outputs.needs_update == 'true' }}
run: |
echo "Updated zstd submodule to ${LATEST_TAG}"
cd zstd
git fetch --tags
git checkout "${LATEST_TAG}"
cd ..
git add zstd
git commit -m "automate: Update ZSTD submodule to ${LATEST_TAG}"
# update runtimes
- name: Download all artifacts
uses: Cysharp/Actions/.github/actions/download-artifact@main
with:
path: artifacts
- name: Place new runtimes
env:
DEST_BASE_PATH: src/NativeCompressions.Zstandard.Runtime/runtimes
run: |
echo "Updated zstd runtimes to ${LATEST_TAG}"
# Create directory structure
for arch in linux-x64 linux-arm64 osx-x64 osx-arm64 win-x64 win-arm64 ios-arm64 ios-x64 android-arm android-arm64 android-x64; do
mkdir -p "${DEST_BASE_PATH}/${arch}/native"
done
# Show current
echo "::group::Show artifacts/"
ls -lR artifacts/
echo "::endgroup::"
echo "::group::Show ${DEST_BASE_PATH}/"
ls -lR "${DEST_BASE_PATH}/"
echo "::endgroup::"
echo "::group::Copy new files"
# Windows
if [ -f artifacts/zstd-win-x64/libzstd.dll ]; then
cp -f artifacts/zstd-win-x64/libzstd.dll "${DEST_BASE_PATH}/win-x64/native/libzstd.dll"
fi
if [ -f artifacts/zstd-win-arm64/libzstd.dll ]; then
cp -f artifacts/zstd-win-arm64/libzstd.dll "${DEST_BASE_PATH}/win-arm64/native/libzstd.dll"
fi
# Linux
if [ -f artifacts/zstd-linux-x64/libzstd.so ]; then
cp -f artifacts/zstd-linux-x64/libzstd.so "${DEST_BASE_PATH}/linux-x64/native/libzstd.so"
fi
if [ -f artifacts/zstd-linux-arm64/libzstd.so ]; then
cp -f artifacts/zstd-linux-arm64/libzstd.so "${DEST_BASE_PATH}/linux-arm64/native/libzstd.so"
fi
# macOS
if [ -f artifacts/zstd-osx-x64/libzstd.dylib ]; then
cp -f artifacts/zstd-osx-x64/libzstd.dylib "${DEST_BASE_PATH}/osx-x64/native/libzstd.dylib"
fi
if [ -f artifacts/zstd-osx-arm64/libzstd.dylib ]; then
cp -f artifacts/zstd-osx-arm64/libzstd.dylib "${DEST_BASE_PATH}/osx-arm64/native/libzstd.dylib"
fi
# iOS
if [ -f artifacts/zstd-ios-arm64/libzstd.a ]; then
cp -f artifacts/zstd-ios-arm64/libzstd.a "${DEST_BASE_PATH}/ios-arm64/native/libzstd.a"
fi
if [ -f artifacts/zstd-ios-x86_64/libzstd.a ]; then
cp -f artifacts/zstd-ios-x86_64/libzstd.a "${DEST_BASE_PATH}/ios-x64/native/libzstd.a"
fi
# Android
if [ -f artifacts/zstd-android-arm/libzstd.so ]; then
cp -f artifacts/zstd-android-arm/libzstd.so "${DEST_BASE_PATH}/android-arm/native/libzstd.so"
fi
if [ -f artifacts/zstd-android-arm64/libzstd.so ]; then
cp -f artifacts/zstd-android-arm64/libzstd.so "${DEST_BASE_PATH}/android-arm64/native/libzstd.so"
fi
if [ -f artifacts/zstd-android-x86_64/libzstd.so ]; then
cp -f artifacts/zstd-android-x86_64/libzstd.so "${DEST_BASE_PATH}/android-x64/native/libzstd.so"
fi
echo "::endgroup::"
echo "::group::git commit"
# Commit runtime updates
git add "${DEST_BASE_PATH}"
git commit -m "automate: Update Zstandard native libraries to ${LATEST_TAG}"
echo "::endgroup::"
# create PR
- name: Push branch and create PR
id: create_pr
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Push the branch
git push origin "${NEW_BRANCH_NAME}"
cat <<'EOF' > artifacts/pr_body.txt
This PR updates Zstandard to the latest release `${{ needs.check_new_release.outputs.latest_tag }}` ([${{ needs.check_new_release.outputs.latest_commit }}](https://github.com/facebook/zstd/commit/${{ needs.check_new_release.outputs.latest_commit }}))
## Changes
- Updated Zstandard submodule to ${{ needs.check_new_release.outputs.latest_tag }}
- Updated native libraries for all platforms:
- Windows x64/ARM64
- Linux x64/ARM64
- macOS x64/ARM64
- Android ARM/ARM64/x64
- iOS ARM64/x64 (device/simulator)
## Build artifacts
All native libraries have been built and tested in CI.
@neuecc
EOF
# Create PR and capture PR number
PR_URL=$(gh pr create --title "automate: Update Zstandard to ${LATEST_TAG}" --base main --head "${NEW_BRANCH_NAME}" --body-file artifacts/pr_body.txt)
PR_NUMBER=$(echo "$PR_URL" | grep -o '[0-9]\+$')
echo "pr_number=$PR_NUMBER" | tee -a "$GITHUB_OUTPUT"
echo "Created PR #$PR_NUMBER: $PR_URL"
build:
needs: [check_new_release, create-pr]
if: ${{ needs.create-pr.result == 'success' }}
permissions:
contents: read
uses: ./.github/workflows/build-debug.yaml
with:
git-ref: "automate/zstd-${{ needs.check_new_release.outputs.latest_tag }}"