Skip to content

Commit 6642003

Browse files
committed
try new version format
1 parent fb47071 commit 6642003

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

.github/workflows/nightly-pypi-build.yml

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,43 @@ on:
2525
workflow_dispatch: # Allows manual triggering
2626

2727
jobs:
28+
set-version:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
VERSION: ${{ steps.set-version.outputs.VERSION }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 1
36+
37+
- uses: actions/setup-python@v5
38+
with:
39+
python-version: 3.12
40+
41+
- name: Install Poetry
42+
run: make install-poetry
43+
44+
- name: Extract version from Poetry
45+
id: set-version
46+
run: |
47+
VERSION=$(poetry version --short)
48+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT # Only needed for outputs
49+
2850
nightly-build:
29-
uses: ./.github/workflows/pypi-build-artifacts.yml # Reference the PyPI build workflow
30-
with:
31-
VERSION: "0.0.0" # Generate nightly version
32-
RC: "1" # Reset RC for nightly builds
51+
needs: set-version
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Set nightly version
55+
run: echo "FULL_VERSION=${{ needs.set-version.outputs.VERSION }}+nightly.$(date +%Y%m%d)" >> $GITHUB_ENV
56+
57+
- name: Debug version
58+
run: echo "Publishing version $FULL_VERSION"
59+
60+
- name: Run PyPI build workflow
61+
uses: ./.github/workflows/pypi-build-artifacts.yml # Reference the PyPI build workflow
62+
with:
63+
VERSION: "${{ env.FULL_VERSION }}"
64+
RC: "0" # Reset RC for nightly builds
3365

3466
testpypi-publish:
3567
name: Publish to TestPypi

0 commit comments

Comments
 (0)