8000 Use dev versioning for test pypi · GPTprojects/llama-cpp-python@3c6e98f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c6e98f

Browse files
committed
Use dev versioning for test pypi
1 parent 1cca203 commit 3c6e98f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/publish-to-test.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
name: Publish to TestPyPI
44

5-
on: workflow_dispatch
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
dev_version:
9+
description: 'Dev version N'
10+
required: true
11+
612

713
jobs:
814
build-n-publish:
@@ -17,6 +23,10 @@ jobs:
1723
uses: actions/setup-python@v4
1824
with:
1925
python-version: "3.8"
26+
- name: Append Dev Version to __version__
27+
run: |
28+
DEV_VERSION=${{ github.event.inputs.dev_version }}
29+
sed -i "s/__version__ = \\".*\\"/__version__ = \\"$(sed -n 's/__version__ = \\"\(.*\)\\"/\1/p' llama_cpp/__init__.py).dev${DEV_VERSION}\\"/" llama_cpp/__init__.py
2030
- name: Install dependencies
2131
run: |
2232
python3 -m pip install --upgrade pip build

0 commit comments

Comments
 (0)
0