@@ -42,30 +42,30 @@ jobs:
4242 if : ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'snapshot' }}
4343 run : |
4444 ./gradlew :serving:createDeb -Psnapshot
45- DJL_VERSION =$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
45+ SERVING_VERSION =$(awk -F '=' '/serving / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
4646 aws s3 cp serving/build/distributions/*.deb s3://djl-ai/publish/djl-serving/
47- aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-serving/djl-serving_${DJL_VERSION }*"
47+ aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-serving/djl-serving_${SERVING_VERSION }*"
4848 - name : Copy serving release artifacts to S3
4949 if : ${{ github.event.inputs.mode == 'staging' }}
5050 run : |
5151 ./gradlew :serving:dZ :serving:createDeb -Pstaging
52- DJL_VERSION =$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
52+ SERVING_VERSION =$(awk -F '=' '/serving / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
5353 aws s3 cp serving/build/distributions/*.deb s3://djl-ai/publish/djl-serving/
54- aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-serving/djl-serving_${DJL_VERSION }*"
55- if [[ $(aws s3 ls s3://djl-ai/publish/djl-serving/serving-$DJL_VERSION .tar | wc -l) -eq 0 ]]; \
54+ aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-serving/djl-serving_${SERVING_VERSION }*"
55+ if [[ $(aws s3 ls s3://djl-ai/publish/djl-serving/serving-$SERVING_VERSION .tar | wc -l) -eq 0 ]]; \
5656 then aws s3 cp serving/build/distributions/*.tar s3://djl-ai/publish/djl-serving/; \
5757 else echo serving tarball published already!; fi
5858 aws s3 cp serving/build/distributions/*.zip s3://djl-ai/publish/djl-serving/
59- aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-serving/serving-${DJL_VERSION }*"
59+ aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-serving/serving-${SERVING_VERSION }*"
6060 - name : Copy benchmark release artifacts to S3
6161 if : ${{ github.event.inputs.mode == 'staging' }}
6262 run : |
6363 ./gradlew :benchmark:dZ :benchmark:createDeb -Pstaging
64- DJL_VERSION =$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
65- aws s3 cp benchmark/build/distributions/*.tar s3://djl-ai/publish/djl-bench/${DJL_VERSION }/
66- aws s3 cp benchmark/build/distributions/*.deb s3://djl-ai/publish/djl-bench/${DJL_VERSION }/
67- aws s3 cp benchmark/build/distributions/*.zip s3://djl-ai/publish/djl-bench/${DJL_VERSION }/
68- aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-bench/${DJL_VERSION }/*"
64+ SERVING_VERSION =$(awk -F '=' '/serving / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
65+ aws s3 cp benchmark/build/distributions/*.tar s3://djl-ai/publish/djl-bench/${SERVING_VERSION }/
66+ aws s3 cp benchmark/build/distributions/*.deb s3://djl-ai/publish/djl-bench/${SERVING_VERSION }/
67+ aws s3 cp benchmark/build/distributions/*.zip s3://djl-ai/publish/djl-bench/${SERVING_VERSION }/
68+ aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/djl-bench/${SERVING_VERSION }/*"
6969 - name : Copy awscurl snapshot artifacts to S3
7070 if : ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'snapshot' }}
7171 run : |
7676 if : ${{ github.event.inputs.mode == 'staging' }}
7777 run : |
7878 ./gradlew :awscurl:jar -Pstaging
79- DJL_VERSION =$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
80- aws s3 cp awscurl/build/awscurl s3://djl-ai/publish/awscurl/${DJL_VERSION }/
81- aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/awscurl/${DJL_VERSION }/*"
79+ SERVING_VERSION =$(awk -F '=' '/serving / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)
80+ aws s3 cp awscurl/build/awscurl s3://djl-ai/publish/awscurl/${SERVING_VERSION }/
81+ aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/awscurl/${SERVING_VERSION }/*"
8282 - name : Publish to snapshot repository
8383 if : ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'snapshot' }}
8484 run : ./gradlew publish -Psnapshot --refresh-dependencies
0 commit comments