-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add package version update action (#78)
- Loading branch information
Showing
7 changed files
with
233 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Checklist | ||
|
||
- [ ] I have updated the documentation accordingly. | ||
- [ ] I have updated the CHANGELOG.md file accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Semantic Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
updateType: | ||
description: "version update type" | ||
required: true | ||
type: choice | ||
default: "patch" | ||
options: | ||
- "major" | ||
- "minor" | ||
- "patch" | ||
packageName: | ||
description: "name of the package to update" | ||
required: true | ||
type: choice | ||
options: | ||
- "ragbits" | ||
- "ragbits-cli" | ||
- "ragbits-core" | ||
- "ragbits-document-search" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "0.4.10" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Create release branch | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git checkout -b release/${{ github.event.inputs.packageName }}-$(date +%Y-%m-%d) | ||
- name: Update packages | ||
id: packages_update | ||
run: | | ||
echo old_version=`grep version packages/${{ github.event.inputs.packageName }}/pyproject.toml | cut -d \" -f2` >> $GITHUB_OUTPUT | ||
uv run scripts/update_ragbits_package.py ${{ github.event.inputs.packageName }} ${{ github.event.inputs.updateType }} | ||
echo new_version=`grep version packages/${{ github.event.inputs.packageName }}/pyproject.toml | cut -d \" -f2` >> $GITHUB_OUTPUT | ||
uv sync | ||
- name: Create PR with updated packages | ||
run: | | ||
COMMIT_MESSAGE="release(${{ github.event.inputs.packageName }}): update to v${{ steps.packages_update.outputs.new_version }}" | ||
git add . | ||
git commit -m "$COMMIT_MESSAGE" | ||
git push -u origin HEAD | ||
gh pr create -B main --title "$COMMIT_MESSAGE" \ | ||
--body 'Update ${{ github.event.inputs.packageName }} version from ${{ steps.packages_update.outputs.old_version }} to ${{ steps.packages_update.outputs.new_version }}' | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CHANGELOG | ||
|
||
## Unreleased | ||
|
||
## 0.1.0 (2024-10-08) | ||
|
||
### Added | ||
|
||
- Initial release of the package. | ||
- Add prompts lab command. | ||
- Add prompts generate-promptfoo-configs command. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# CHANGELOG | ||
|
||
## Unreleased | ||
|
||
## 0.1.0 (2024-10-08) | ||
|
||
### Added | ||
|
||
|
||
- Initial release of the package. | ||
- Introduce core components: Prompts, LLMs, Embeddings and VectorStores. | ||
- `Prompt` class integration with promptfoo. | ||
- LiteLLM integration. | ||
- ChromaDB integration. | ||
- Prompts lab. | ||
- Prompts autodiscovery. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CHANGELOG | ||
|
||
## Unreleased | ||
|
||
|
||
## 0.1.0 (2024-10-08) | ||
|
||
### Added | ||
|
||
- Initial release of the package. | ||
- Introduce core modules: documents, ingestion and retrival. | ||
- Unstructured integration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# CHANGELOG | ||
|
||
## Unreleased | ||
|
||
## 0.1.0 (2024-10-08) | ||
|
||
### Added | ||
|
||
- ragbits-core v0.1.0: | ||
- Initial release of the package. | ||
- Introduce core components: Prompts, LLMs, Embeddings and VectorStores. | ||
- `Prompt` class integration with promptfoo. | ||
- LiteLLM integration. | ||
- ChromaDB integration. | ||
- Prompts lab. | ||
- Prompts autodiscovery. | ||
|
||
- ragbits-cli v0.1.0: | ||
- Initial release of the package. | ||
- Add prompts lab command. | ||
- Add prompts generate-promptfoo-configs command. | ||
|
||
- ragbits-document-search v0.1.0: | ||
- Initial release of the package. | ||
- Introduce core modules: documents, ingestion and retrival. | ||
- Unstructured integration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters