Skip to content

Commit

Permalink
try new version format
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Feb 3, 2025
1 parent fb47071 commit 1c34186
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/nightly-pypi-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,38 @@ on:
workflow_dispatch: # Allows manual triggering

jobs:
set-version:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.set-version.outputs.VERSION }}
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 from Poetry
id: set-version
run: |
CURRENT_VERSION=$(poetry version --short)
VERSION="${CURRENT_VERSION}.dev$(date +%Y%m%d)"
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Debug version
run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}"

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.dev20250203
rc: "0" # Reset RC for nightly builds

testpypi-publish:
name: Publish to TestPypi
Expand All @@ -56,3 +83,4 @@ jobs:
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true

0 comments on commit 1c34186

Please sign in to comment.