2323 workflow_dispatch :
2424 # To trigger the Env Test workflow manually, follow the instructions in
2525 # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
26+ inputs :
27+ gitReleaseTag :
28+ description : ' Release tag to upload to. Must start with "release-"'
29+ type : string
2630
2731# For non-release branches (namely: PRs), only run CI on the most recent commit. Cancel
2832# runs on previous commits mid-flight when new commits are pushed.
4852 cd icu4c/source;
4953 ./runConfigureICU Linux --disable-renaming;
5054 # Fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile.
51- # Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present.
55+ # Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present.
5256 set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file .?Doxyfile)' doxygen.log )
5357
5458 # gcc debug build.
@@ -316,13 +320,13 @@ jobs:
316320 run : |
317321 cd icu4c/source && ./runConfigureICU --enable-debug --disable-release Linux/clang && make -j -l4.5 check
318322
319- # Clang Linux 18 with CPP20 and treat warnings as errors
323+ # Clang Linux 18 with CPP20 and treat warnings as errors
320324 clang18-cpp20-warning-as-errors :
321325 runs-on : ubuntu-latest
322326 strategy :
323327 fail-fast : false
324328 matrix :
325- flags :
329+ flags :
326330 - ' -std=c++20'
327331 - ' -std=c++20 -stdlib=libc++'
328332 steps :
@@ -360,7 +364,7 @@ jobs:
360364 strategy :
361365 fail-fast : false
362366 matrix :
363- include :
367+ include :
364368 - test_flags : ' x64 Debug'
365369 build_flags : ' /p:Configuration=Debug /p:Platform=x64'
366370 - test_flags : ' x86 Debug'
@@ -405,11 +409,13 @@ jobs:
405409 # Windows MSVC distribution release
406410 windows-msvc-dist-release :
407411 runs-on : windows-latest
412+ permissions :
413+ contents : write # So that we can upload to release
408414 timeout-minutes : 30
409415 strategy :
410416 fail-fast : false
411417 matrix :
412- include :
418+ include :
413419 - arch : ' x64'
414420 plat : ' x64'
415421 win_ver : ' Win64'
@@ -465,6 +471,12 @@ jobs:
465471 with :
466472 name : icu4c.${{ matrix.win_ver }}.run_#${{ github.run_number }}
467473 path : icu4c/source/dist/${{ env.newZipName }}.zip
474+ - name : Upload to release
475+ if : ${{ inputs.gitReleaseTag && startsWith(inputs.gitReleaseTag, 'release-') }}
476+ run : |
477+ gh release upload ${{ inputs.gitReleaseTag }} icu4c/source/dist/${{ env.newZipName }}.zip --clobber
478+ env :
479+ GH_TOKEN : ${{ github.token }}
468480
469481 # Window MSYS2 tests
470482 windows-msys2-gcc-x86_64 :
@@ -481,9 +493,9 @@ jobs:
481493 with :
482494 update : true
483495 msystem : mingw64
484- install : >
485- base-devel
486- mingw-w64-x86_64-toolchain
496+ install : >
497+ base-devel
498+ mingw-w64-x86_64-toolchain
487499 make
488500 - name : ' Verify MinGW Installation'
489501 run : gcc --version
@@ -824,7 +836,7 @@ jobs:
824836 run : |
825837 cd icu4c/source
826838 make -j -l4.5 check
827-
839+
828840 # https://unicode-org.github.io/icu/processes/release/tasks/healthy-code.html#test-uconfig_no_conversion
829841 icu4c-uconfig-no-conversion :
830842 runs-on : ubuntu-latest
@@ -848,6 +860,8 @@ jobs:
848860 # Workflow for ICU Export Data for ICU4X
849861 icu4c-icuexportdata :
850862 runs-on : ubuntu-latest
863+ permissions :
864+ contents : write # So that we can upload to release
851865 timeout-minutes : 30
852866 steps :
853867 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -910,9 +924,15 @@ jobs:
910924 - name : Zip
911925 run : |
912926 cd icu4c/source/icuexportdata
913- zip -r ../../../icuexportdata_tag-goes-here .zip .
927+ zip -r ../../../icuexportdata_${{ inputs.gitReleaseTag }} .zip .
914928 - name : Publish Artifact
915929 uses : actions/upload-artifact@v4
916930 with :
917931 name : icuexportdata_output
918- path : icuexportdata_tag-goes-here.zip
932+ path : icuexportdata_*.zip
933+ - name : Upload to release
934+ if : ${{ inputs.gitReleaseTag && startsWith(inputs.gitReleaseTag, 'release-') }}
935+ run : |
936+ gh release upload ${{ inputs.gitReleaseTag }} icuexportdata_*.zip --clobber
937+ env :
938+ GH_TOKEN : ${{ github.token }}
0 commit comments