mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-15 04:18:56 +00:00
GH workflow fü release to pypi
This commit is contained in:
1 parent
62cce5d66a
commit
992d4927b8
4 files changed
+56
-33
No files matched your search
@@ -0,0 +1,47 @@
|
||||
name: Publish Python Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
|
||||
env:
|
||||
# Set this to true manually in the GitHub workflow UI if you want to publish to PyPI
|
||||
# Will always publish to testpypi
|
||||
PUBLISH_TO_PYPI: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish the serena-agent package
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
id-token: write # Required for trusted publishing
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "latest"
|
||||
|
||||
- name: Build package
|
||||
run: uv build
|
||||
|
||||
- name: Upload artifacts to GitHub Release
|
||||
if: env.PUBLISH_TO_PYPI == 'true'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.tar.gz
|
||||
dist/*.whl
|
||||
|
||||
- name: Publish to TestPyPI
|
||||
run: uv publish --index testpypi
|
||||
|
||||
- name: Publish to PyPI (conditional)
|
||||
if: env.PUBLISH_TO_PYPI == 'true'
|
||||
run: uv publish
|
||||
Reference in new issue
Block a user