From d7349433f3a5bbd341b62d10ec8f908f8330ec42 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 5 Feb 2025 20:51:38 -0800 Subject: [PATCH] refactor remove RC --- .github/workflows/nightly-pypi-build.yml | 18 +++++++----------- .github/workflows/pypi-build-artifacts.yml | 8 ++------ .github/workflows/python-release.yml | 6 ++---- .github/workflows/svn-build-artifacts.yml | 5 +---- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/nightly-pypi-build.yml b/.github/workflows/nightly-pypi-build.yml index 8253180b12..e7a32a3d0a 100644 --- a/.github/workflows/nightly-pypi-build.yml +++ b/.github/workflows/nightly-pypi-build.yml @@ -30,7 +30,6 @@ jobs: runs-on: ubuntu-latest outputs: VERSION: ${{ steps.set-version.outputs.VERSION }} - RC: ${{ steps.set-version.outputs.RC }} steps: - uses: actions/checkout@v4 with: @@ -43,24 +42,21 @@ jobs: - name: Install Poetry run: make install-poetry - - name: Extract version and rc + - name: Set version id: set-version run: | - VERSION=$(poetry version --short) - RC="$(date +%Y%m%d)" - echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" - echo "RC=$RC" >> "$GITHUB_OUTPUT" + CURRENT_VERSION=$(poetry version --short) + TIMESTAMP=$(date +%Y%m%d%H%M%S) + echo "VERSION=${CURRENT_VERSION}.dev${TIMESTAMP}" >> "$GITHUB_OUTPUT" - - name: Debug version and rc - run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}rc${{ steps.set-version.outputs.RC }}" + - name: Debug version + run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}" nightly-build: needs: set-version uses: ./.github/workflows/pypi-build-artifacts.yml with: - version: ${{ needs.set-version.outputs.VERSION }} # i.e. 0.9.0 - rc: ${{ needs.set-version.outputs.RC }} # i.e. 20250203 - + version: ${{ needs.set-version.outputs.VERSION }} testpypi-publish: name: Publish to TestPypi needs: diff --git a/.github/workflows/pypi-build-artifacts.yml b/.github/workflows/pypi-build-artifacts.yml index 897d640525..288e5c0046 100644 --- a/.github/workflows/pypi-build-artifacts.yml +++ b/.github/workflows/pypi-build-artifacts.yml @@ -25,9 +25,6 @@ on: VERSION: required: true type: string - RC: - required: true - type: string jobs: pypi-build-artifacts: @@ -56,8 +53,7 @@ jobs: - name: Set version with RC env: VERSION: ${{ inputs.VERSION }} - RC: ${{ inputs.RC }} - run: python -m poetry version "${{ env.VERSION }}rc${{ env.RC }}" # e.g., 0.8.0rc1 + run: python -m poetry version "${{ env.VERSION }}" # Publish the source distribution with the version that's in # the repository, otherwise the tests will fail @@ -97,6 +93,6 @@ jobs: - name: Merge Artifacts uses: actions/upload-artifact/merge@v4 with: - name: "pypi-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}" + name: "pypi-release-candidate-${{ inputs.VERSION }}" pattern: pypi-release-candidate* delete-merged: true diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 8c2216d8a7..a6175ead9e 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -121,8 +121,7 @@ jobs: - validate-library-version uses: ./.github/workflows/svn-build-artifacts.yml with: - version: ${{ needs.validate-inputs.outputs.VERSION }} - rc: ${{ needs.validate-inputs.outputs.RC }} + version: ${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }} # PyPi pypi-build-artifacts: @@ -131,5 +130,4 @@ jobs: - validate-library-version uses: ./.github/workflows/pypi-build-artifacts.yml with: - version: ${{ needs.validate-inputs.outputs.VERSION }} - rc: ${{ needs.validate-inputs.outputs.RC }} + version: ${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }} diff --git a/.github/workflows/svn-build-artifacts.yml b/.github/workflows/svn-build-artifacts.yml index 81737df833..8336b46940 100644 --- a/.github/workflows/svn-build-artifacts.yml +++ b/.github/workflows/svn-build-artifacts.yml @@ -25,9 +25,6 @@ on: VERSION: required: true type: string - RC: - required: true - type: string jobs: svn-build-artifacts: @@ -91,6 +88,6 @@ jobs: - name: Merge Artifacts uses: actions/upload-artifact/merge@v4 with: - name: "svn-release-candidate-${{ inputs.VERSION }}rc${{ inputs.RC }}" + name: "svn-release-candidate-${{ inputs.VERSION }}" pattern: svn-release-candidate* delete-merged: true