CI: build python package
This commit is contained in:
parent
5c27a26e78
commit
23afaa7c82
1 changed files with 19 additions and 3 deletions
|
@ -17,13 +17,13 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: container
|
runs-on: container
|
||||||
container:
|
container:
|
||||||
image: tiptop:5000/treetrail-backend-ci
|
image: code.philo.ydns.eu/philorg/treetrail-backend-ci
|
||||||
volumes:
|
volumes:
|
||||||
- "uv_cache:/root/.cache/uv"
|
- "uv_cache:/root/.cache/uv"
|
||||||
- "ca-cert:/etc/containers/certs.d"
|
- "ca-cert:/etc/containers/certs.d"
|
||||||
services:
|
services:
|
||||||
treetrail-database:
|
treetrail-database:
|
||||||
image: tiptop:5000/treetrail-database
|
image: code.philo.ydns.eu/philorg/treetrail-database
|
||||||
steps:
|
steps:
|
||||||
- name: Echo env
|
- name: Echo env
|
||||||
if: ${{ inputs.verbose }}
|
if: ${{ inputs.verbose }}
|
||||||
|
@ -58,7 +58,7 @@ jobs:
|
||||||
echo "run=$RUN" >> $GITHUB_OUTPUT
|
echo "run=$RUN" >> $GITHUB_OUTPUT
|
||||||
echo "Run build: $RUN"
|
echo "Run build: $RUN"
|
||||||
|
|
||||||
- name: Info - version and if the image container should be built
|
- name: Info - version and test if the git version is clean (then python package and image container should be built)
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.version.outputs.version }}
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
RUN: ${{ steps.builder.outputs.run }}
|
RUN: ${{ steps.builder.outputs.run }}
|
||||||
|
@ -66,6 +66,22 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "Version $VERSION, force (manual input): $FORCE, run the build: $RUN"
|
echo "Version $VERSION, force (manual input): $FORCE, run the build: $RUN"
|
||||||
|
|
||||||
|
- name: Set the version in pyproject.toml (workaround for uv not supporting dynamic version)
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
|
run: sed "s/0.0.0/${VERSION}/" -i pyproject.toml
|
||||||
|
|
||||||
|
- name: Build python package
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
|
run: uv build --wheel
|
||||||
|
|
||||||
|
- name: Publish Python package (home)
|
||||||
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
|
env:
|
||||||
|
LOCAL_PYPI_TOKEN: ${{ secrets.LOCAL_PYPI_TOKEN }}
|
||||||
|
run: uv publish --publish-url https://code.philo.ydns.eu/api/packages/philorg/pypi --token $LOCAL_PYPI_TOKEN
|
||||||
|
|
||||||
- name: Workaround for bug of podman-login
|
- name: Workaround for bug of podman-login
|
||||||
if: fromJSON(steps.builder.outputs.run)
|
if: fromJSON(steps.builder.outputs.run)
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue