Skip to content

Commit 3cc5ca1

Browse files
committed
try new version format
1 parent f7d82cc commit 3cc5ca1

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

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

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,40 @@ 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+
RC: ${{ steps.set-version.outputs.RC }}
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 1
37+
38+
- uses: actions/setup-python@v5
39+
with:
40+
python-version: 3.12
41+
42+
- name: Install Poetry
43+
run: make install-poetry
44+
45+
- name: Extract version and rc
46+
id: set-version
47+
run: |
48+
VERSION=$(poetry version --short)
49+
RC="$(date +%Y%m%d)"
50+
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
51+
echo "RC=$RC" >> "$GITHUB_OUTPUT"
52+
53+
- name: Debug version and rc
54+
run: echo "Publishing version ${{ steps.set-version.outputs.VERSION }}rc${{ steps.set-version.outputs.RC }}"
55+
2856
nightly-build:
29-
uses: ./.github/workflows/pypi-build-artifacts.yml # Reference the PyPI build workflow
57+
needs: set-version
58+
uses: ./.github/workflows/pypi-build-artifacts.yml
3059
with:
31-
VERSION: "0.0.0" # Generate nightly version
32-
RC: "1" # Reset RC for nightly builds
60+
version: ${{ needs.set-version.outputs.VERSION }} # i.e. 0.9.0
61+
rc: ${{ needs.set-version.outputs.RC }} # i.e. 20250203
3362

3463
testpypi-publish:
3564
name: Publish to TestPypi
@@ -56,3 +85,4 @@ jobs:
5685
with:
5786
repository-url: https://test.pypi.org/legacy/
5887
skip-existing: true
88+
verbose: true

0 commit comments

Comments
 (0)