From 4aec0a348a243559bd74636bffc0292859b1a063 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Fri, 26 Apr 2024 17:57:00 -0700 Subject: [PATCH] Update the upload job (#3385) Summary: The current regex doesn't match as needed, but the corrected one does. Also exporting the GITHUB_REF variable just in case. Pull Request resolved: https://github.com/pytorch/executorch/pull/3385 Reviewed By: dbort Differential Revision: D56659290 Pulled By: svekars fbshipit-source-id: 19672df509656958e355d2a88c506cfe056649fd (cherry picked from commit 9314595c638eda5cf53606e68b55fb50e7eba1a7) --- .github/workflows/doc-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index b1c33cf2eae..d4fcabb1339 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -94,11 +94,11 @@ jobs: # Get github.ref for the output doc folder. By default "main" # If matches a tag like refs/tags/v1.12.0-rc3 or # refs/tags/v1.12.0 convert to 1.12 - GITHUB_REF=${{ github.ref }} + export GITHUB_REF=${{ github.ref }} # Convert refs/tags/v1.12.0rc3 into 1.12. # Adopted from https://github.com/pytorch/pytorch/blob/main/.github/workflows/_docs.yml#L150C11-L155C13 - if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\\.[0-9]+)\\. ]]; then + if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+) ]]; then TARGET_FOLDER="${BASH_REMATCH[1]}" else TARGET_FOLDER="main"