File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,7 +295,8 @@ jobs:
295295
296296 needs : build-docs
297297 if : github.repository == 'meta-pytorch/torchcodec' && github.event_name == 'push' &&
298- ((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
298+ ((github.ref_type == 'branch' && github.ref_name == 'main') ||
299+ (github.ref_type == 'tag' && !contains(github.ref_name, '-rc')))
299300 runs-on : ubuntu-latest
300301 steps :
301302 - name : Check out gh-pages branch
@@ -318,17 +319,9 @@ jobs:
318319 if [[ "${REF_TYPE}" == branch ]]; then
319320 TARGET_FOLDER="${REF_NAME}"
320321 elif [[ "${REF_TYPE}" == tag ]]; then
321- case "${REF_NAME}" in
322- *-rc*)
323- echo "Aborting upload since this is an RC tag: ${REF_NAME}"
324- exit 0
325- ;;
326- *)
327- # Strip the leading "v" as well as the trailing patch version. For example:
328- # 'v0.10.2' -> '0.10'
329- TARGET_FOLDER=$(echo "${REF_NAME}" | sed 's/v\([0-9]\+\)\.\([0-9]\+\)\.[0-9]\+/\1.\2/')
330- ;;
331- esac
322+ # Strip the leading "v" as well as the trailing patch version. For example:
323+ # 'v0.10.2' -> '0.10'
324+ TARGET_FOLDER=$(echo "${REF_NAME}" | sed 's/v\([0-9]\+\)\.\([0-9]\+\)\.[0-9]\+/\1.\2/')
332325 fi
333326 echo "Target Folder: ${TARGET_FOLDER}"
334327
You can’t perform that action at this time.
0 commit comments