From 20259176514cf6d24b491c844c6ac92380dbd7f3 Mon Sep 17 00:00:00 2001 From: BoykoAlex Date: Thu, 21 Aug 2025 13:43:06 -0700 Subject: [PATCH 1/2] [GHA] Fix VSIX builds uploads/deletes [GHA] Fix typo --- .github/scripts/gen-vscode-link-bullet.sh | 3 ++- .github/workflows/build-vscode-extension.yml | 2 +- .../workflows/release-vscode-extension.yml | 2 +- .../workflows/snapshot-vscode-extension.yml | 19 +++++++++++++------ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/scripts/gen-vscode-link-bullet.sh b/.github/scripts/gen-vscode-link-bullet.sh index 225a2c4526..fca0be8a9b 100755 --- a/.github/scripts/gen-vscode-link-bullet.sh +++ b/.github/scripts/gen-vscode-link-bullet.sh @@ -1,8 +1,9 @@ id=$1 label=$2 download_url_root=$3 +version=$4 -vsix_file=`aws s3 ls s3://$AWS_S3_BUCKET/snapshot/vscode-extensions/$id/ | awk '{$1=$2=$3=""; print $0}' | awk '{$1=$1};1' | grep "\.vsix$"` +vsix_file=`aws s3 ls s3://$AWS_S3_BUCKET/snapshot/vscode-extensions/$id/ | awk '{$1=$2=$3=""; print $0}' | awk '{$1=$1};1' | grep "${id}-${version}.*\.vsix$"` if [ ! -z "${vsix_file}" ]; then echo "
  • ${label}: ${vsix_file}
  • " fi \ No newline at end of file diff --git a/.github/workflows/build-vscode-extension.yml b/.github/workflows/build-vscode-extension.yml index ccc8338bbb..89e8d79dd1 100644 --- a/.github/workflows/build-vscode-extension.yml +++ b/.github/workflows/build-vscode-extension.yml @@ -55,7 +55,7 @@ jobs: echo "VSIX file to upload ${vsix_file}" s3_path=${{ inputs.dist }}/vscode-extensions/${{ inputs.extension-name }}/$base_version echo "S3 path: ${s3_path}" - aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive + aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive --exclude "*" --include "${{ inputs.extension-name }}-${base_version}*.vsix" aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/$vsix_file --no-progress echo "version=$base_version" >> $GITHUB_OUTPUT echo "s3_url=${DOWNLOAD_URL_ROOT}/$s3_path/$vsix_file" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release-vscode-extension.yml b/.github/workflows/release-vscode-extension.yml index 7fdd655c64..e5b71c29a7 100644 --- a/.github/workflows/release-vscode-extension.yml +++ b/.github/workflows/release-vscode-extension.yml @@ -74,7 +74,7 @@ jobs: echo "VSIX file to upload ${vsix_file}" s3_path=release/vscode-extensions/${{ inputs.extension-name }}/${{ steps.version.outputs.version }} echo "S3 path: ${s3_path}" - aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive + aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive --exclude "*" --include "${{ inputs.extension-name }}-${{ steps.version.outputs.version }}*.vsix" aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/${{ steps.version.outputs.release_name }}.vsix --no-progress --checksum-algorithm CRC32 echo "s3_url=${DOWNLOAD_URL_ROOT}/$s3_path/${{ steps.version.outputs.release_name }}.vsix" >> $GITHUB_OUTPUT # - id: tools-team-slack diff --git a/.github/workflows/snapshot-vscode-extension.yml b/.github/workflows/snapshot-vscode-extension.yml index f1aafc845c..41bd5b23c5 100644 --- a/.github/workflows/snapshot-vscode-extension.yml +++ b/.github/workflows/snapshot-vscode-extension.yml @@ -37,6 +37,13 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 22 + - name: version + run: | + cd ${{ github.workspace }}/vscode-extensions/${{ inputs.extension-name }} + version=$(npm pkg get version) + cd ${{ github.workspace }} + echo $version + echo "version=$version" >> $GITHUB_OUTPUT - name: Build .VSIX file id: build-vsix env: @@ -51,17 +58,17 @@ jobs: echo "VSIX file to upload ${vsix_file}" s3_path=snapshot/vscode-extensions/${{ inputs.extension-name }} echo "S3 path: ${s3_path}" - aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive + aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive --exclude "*" --include "${{ inputs.extension-name }}-${{ steps.version.outputs.version }}*.vsix" aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/$vsix_file --no-progress --checksum-algorithm CRC32 - name: Update Nightly Builds download page run: | downloads_html="vscode-extensions-snippet.html" echo '' >> $downloads_html cat ./$downloads_html aws s3 mv ./$downloads_html s3://$AWS_S3_BUCKET/snapshot/vscode-extensions/ --no-progress --checksum-algorithm CRC32 From dbc9b88f77c15af3c8b22e9769a2902271aa29bb Mon Sep 17 00:00:00 2001 From: BoykoAlex Date: Thu, 21 Aug 2025 20:00:18 -0700 Subject: [PATCH 2/2] [GHA] Fix typo [GHA] Fix typo --- .github/workflows/snapshot-vscode-extension.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/snapshot-vscode-extension.yml b/.github/workflows/snapshot-vscode-extension.yml index 41bd5b23c5..ff04939de5 100644 --- a/.github/workflows/snapshot-vscode-extension.yml +++ b/.github/workflows/snapshot-vscode-extension.yml @@ -38,6 +38,7 @@ jobs: with: node-version: 22 - name: version + id: version run: | cd ${{ github.workspace }}/vscode-extensions/${{ inputs.extension-name }} version=$(npm pkg get version)