From f833d19c96ffb3e4a17810e2c1e875cd29f3d5cd Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Mon, 3 Feb 2025 09:00:57 -0800 Subject: [PATCH] try new version format --- .github/workflows/nightly-pypi-build.yml | 36 ++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-pypi-build.yml b/.github/workflows/nightly-pypi-build.yml index 661d060eb2..328b6e54d5 100644 --- a/.github/workflows/nightly-pypi-build.yml +++ b/.github/workflows/nightly-pypi-build.yml @@ -25,11 +25,40 @@ on: workflow_dispatch: # Allows manual triggering jobs: + set-version: + runs-on: ubuntu-latest + outputs: + VERSION: ${{ steps.set-version.outputs.VERSION }} + RC: ${{ steps.set-version.outputs.RC }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - name: Install Poetry + run: make install-poetry + + - name: Extract version and rc + id: set-version + run: | + VERSION=$(poetry version --short) + RC="$(date +%Y%m%d)" + echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" + echo "RC=$RC" >> "$GITHUB_OUTPUT" + + - name: Debug version and rc + run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}rc${{ steps.set-version.outputs.RC }}" + nightly-build: - uses: ./.github/workflows/pypi-build-artifacts.yml # Reference the PyPI build workflow + needs: set-version + uses: ./.github/workflows/pypi-build-artifacts.yml with: - VERSION: "0.0.0" # Generate nightly version - RC: "1" # Reset RC for nightly builds + version: ${{ needs.set-version.outputs.VERSION }} # i.e. 0.9.0 + rc: ${{ needs.set-version.outputs.RC }} # i.e. 20250203 testpypi-publish: name: Publish to TestPypi @@ -56,3 +85,4 @@ jobs: with: repository-url: https://test.pypi.org/legacy/ skip-existing: true + verbose: true