Use dev versioning for test pypi

This commit is contained in:
Andrei Betlen 2023-09-29 22:57:49 -04:00
parent 1cca20304b
commit 3c6e98f945

View file

@ -2,7 +2,13 @@
name: Publish to TestPyPI
on: workflow_dispatch
on:
workflow_dispatch:
inputs:
dev_version:
description: 'Dev version N'
required: true
jobs:
build-n-publish:
@ -17,6 +23,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Append Dev Version to __version__
run: |
DEV_VERSION=${{ github.event.inputs.dev_version }}
sed -i "s/__version__ = \\".*\\"/__version__ = \\"$(sed -n 's/__version__ = \\"\(.*\)\\"/\1/p' llama_cpp/__init__.py).dev${DEV_VERSION}\\"/" llama_cpp/__init__.py
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip build