44 workflow_call:
55 inputs:
66 version:
7+ description: "Version to build (x.x.x)"
78 type: string
89 required: false
910 default: ''
5051 run: uv run basedpyright
5152
5253 test:
53- name: Test
54+ name: Unit Tests
5455 runs-on: ubuntu-latest
5556 steps:
5657 - name: Checkout code
@@ -70,14 +71,13 @@ jobs:
7071 - name: Install dependencies
7172 shell: bash
7273 run: uv sync --group dev
73-
7474
7575 - name: Run tests
7676 run: uv run pytest tests/ -v
7777
7878 python-package:
7979 name: Python Package
80- needs:
80+ needs:
8181 - lint
8282 - test
8383 runs-on: ubuntu-latest
9999 version: latest
100100 enable-cache: true
101101
102+ - name: Update version
103+ shell: bash
104+ if: inputs.version != ''
105+ run: uv version ${inputs.version}
106+
102107 - name: Build wheel
103108 shell: bash
104109 run: |
@@ -120,7 +125,7 @@ jobs:
120125
121126 build-binaries:
122127 name: ${{ matrix.platform }} Binary
123- needs:
128+ needs:
124129 - lint
125130 - test
126131 runs-on: ${{ matrix.runner }}
@@ -152,27 +157,32 @@ jobs:
152157 version: latest
153158 enable-cache: true
154159
160+ - name: Update version
161+ shell: bash
162+ if: inputs.version != ''
163+ run: uv version ${inputs.version}
164+
155165 - name: Install dependencies
156166 shell: bash
157- run: uv sync
167+ run: uv sync --group build
158168
159169 - name: Build binary
160170 shell: bash
161171 run: |
162- uv run pyinstaller src/lumos_cli /__main__.py
172+ uv run pyinstaller src/lumos /__main__.py
163173 if [[ "${{ matrix.platform }}" == "windows" ]]; then
164174 mv ./dist/__main__/__main__.exe ./dist/__main__/lumos.exe
165175 else
166176 mv ./dist/__main__/__main__ ./dist/__main__/lumos
167177 fi
168178 VERSION="${{ inputs.version || 'dev' }}"
169- tar -czf lumos-${{ matrix.platform }}-${VERSION}.tar.gz -C ./dist/__main__ .
179+ tar -czf lumos-${{ matrix.platform }}-v ${VERSION}.tar.gz -C ./dist/__main__ .
170180
171181 - name: Upload artifacts to workflow
172182 uses: actions/upload-artifact@v4
173183 with:
174- name: lumos-${{ matrix.platform }}-${{ inputs.version || 'dev' }}
175- path: lumos-${{ matrix.platform }}-${{ inputs.version || 'dev' }}.tar.gz
184+ name: lumos-${{ matrix.platform }}-v ${{ inputs.version || 'dev' }}
185+ path: lumos-${{ matrix.platform }}-v ${{ inputs.version || 'dev' }}.tar.gz
176186 retention-days: 90
177187
178188 test-binaries:
@@ -196,19 +206,19 @@ jobs:
196206 - name: Download binary artifact
197207 uses: actions/download-artifact@v4
198208 with:
199- name: lumos-${{ matrix.platform }}-${{ inputs.version || 'dev' }}
209+ name: lumos-${{ matrix.platform }}-v ${{ inputs.version || 'dev' }}
200210
201211 - name: Extract and test binary (Unix)
202212 if: matrix.platform != 'windows'
203213 shell: bash
204214 run: |
205- tar -xzf lumos-${{ matrix.platform }}-${{ inputs.version || 'dev' }}.tar.gz
215+ tar -xzf lumos-${{ matrix.platform }}-v ${{ inputs.version || 'dev' }}.tar.gz
206216 chmod +x lumos
207217 ./lumos --version
208218
209219 - name: Extract and test binary (Windows)
210220 if: matrix.platform == 'windows'
211221 shell: pwsh
212222 run: |
213- tar -xzf lumos-${{ matrix.platform }}-${{ inputs.version || 'dev' }}.tar.gz
223+ tar -xzf lumos-${{ matrix.platform }}-v ${{ inputs.version || 'dev' }}.tar.gz
214224 .\lumos.exe --version
0 commit comments