From 05daf17a74f60be142be11778e142b1de0320a88 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Sun, 8 Jun 2025 10:33:45 +0900 Subject: [PATCH] [Update] Refactor Hugging Face upload process to use temporary directory and add tagging for releases --- .github/workflows/release.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index daec6629..ff2362a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,10 +55,20 @@ jobs: - name: Upload to Hugging Face Hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} + shell: pwsh # Explicitly use PowerShell for file operations run: | pip install huggingface_hub - huggingface-cli upload ms-software/VRCT VRCT.zip VRCT.zip --repo-type dataset --commit-message "👍️[Update] ${{ env.VERSION }} Release" - huggingface-cli upload ms-software/VRCT VRCT_cuda.zip VRCT_cuda.zip --repo-type dataset --commit-message "👍️[Update] ${{ env.VERSION }} Release" + + $UPLOAD_DIR = "./hf_upload_temp" + New-Item -ItemType Directory -Force -Path $UPLOAD_DIR + Copy-Item -Path ./VRCT.zip -Destination "$UPLOAD_DIR/VRCT.zip" + Copy-Item -Path ./VRCT_cuda.zip -Destination "$UPLOAD_DIR/VRCT_cuda.zip" + + huggingface-cli upload ms-software/VRCT $UPLOAD_DIR . --repo-type model --commit-message "👍️[Update] ${{ env.VERSION }} Release" + + huggingface-cli tag ms-software/VRCT ${{ github.ref_name }} --repo-type model --message "Release ${{ github.ref_name }}" + + Remove-Item -Recurse -Force $UPLOAD_DIR - name: Create GitHub Release id: create_release