Skip to content

Commit

Permalink
ci: Publish to PyPi on new release
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Nov 2, 2024
1 parent c3c4285 commit 6eade2b
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
target: "./libertai_agents"
execute_command: 'poetry run mypy'

ruff:
package-ruff:
name: "Package: ruff"
runs-on: ubuntu-latest
defaults:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish release to PyPi

on:
release:
types: [created]

jobs:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./libertai_agents
environment:
name: pypi
url: https://pypi.org/project/libertai-agents
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'poetry'
- name: Install dependencies
run: poetry install
- name: Build package
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./libertai_agents/dist
Loading

0 comments on commit 6eade2b

Please sign in to comment.