From 1e2d75380432161d4ecce58ca76d709fdd486f52 Mon Sep 17 00:00:00 2001 From: Douglas Yang Date: Mon, 15 Dec 2025 01:11:03 -0800 Subject: [PATCH] fix: adding date and fixing release name issue (#15174) --- .github/workflows/release-pypi-nightly.yml | 8 +++++--- .github/workflows/release-pypi-pr.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-pypi-nightly.yml b/.github/workflows/release-pypi-nightly.yml index 0c546256a..8e4eda9d0 100644 --- a/.github/workflows/release-pypi-nightly.yml +++ b/.github/workflows/release-pypi-nightly.yml @@ -49,12 +49,14 @@ jobs: COMMIT_HASH=$(git rev-parse --short HEAD) COMMIT_COUNT=$(git rev-list --count HEAD) - # Get current date in YYYY-MM-DD format + # Get current date in YYYY-MM-DD format for release tag BUILD_DATE=$(date -u +%Y-%m-%d) + # Get compact date format for wheel filename (YYYYMMDD) + BUILD_DATE_COMPACT=$(date -u +%Y%m%d) # Generate nightly version following PEP 440 - # Format: {base_version}.dev{commit_count}+g{commit_hash} - NIGHTLY_VERSION="${BASE_VERSION}.dev${COMMIT_COUNT}+g${COMMIT_HASH}" + # Format: {base_version}.dev{commit_count}+{date}.g{commit_hash} + NIGHTLY_VERSION="${BASE_VERSION}.dev${COMMIT_COUNT}+${BUILD_DATE_COMPACT}.g${COMMIT_HASH}" echo "Base version: ${BASE_VERSION}" echo "Nightly version: ${NIGHTLY_VERSION}" diff --git a/.github/workflows/release-pypi-pr.yml b/.github/workflows/release-pypi-pr.yml index efcc1bcbb..537a542d6 100644 --- a/.github/workflows/release-pypi-pr.yml +++ b/.github/workflows/release-pypi-pr.yml @@ -122,7 +122,7 @@ jobs: uses: softprops/action-gh-release@v2 with: tag_name: pr-${{ inputs.pr_number }}-${{ needs.build-pr-wheel.outputs.build_date }}-${{ needs.build-pr-wheel.outputs.commit_hash }} - name: PR #${{ inputs.pr_number }} Build (${{ needs.build-pr-wheel.outputs.commit_hash }}) + name: "PR #${{ inputs.pr_number }} Build (${{ needs.build-pr-wheel.outputs.commit_hash }})" repository: sgl-project/whl token: ${{ secrets.GH_PAT_FOR_WHL_RELEASE }} prerelease: true