Skip to content

Commit

Permalink
Use trusted publisher for pypi release (#3596)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored Oct 2, 2024
1 parent 289e0f4 commit 7431b66
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name: python-package
on:
release:
types: [published]
workflow_dispatch:
permissions: {}
# actions: read
# checks: read
Expand All @@ -19,7 +20,11 @@ jobs:
os: ['ubuntu-latest']
python-version: [3.10]
runs-on: ${{ matrix.os }}
environment: package
environment:
name: package
url: https://pypi.org/p/autogen-agentchat
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,6 +53,5 @@ jobs:
run: |
pip install twine
python setup.py sdist bdist_wheel
- name: Publish to PyPI
shell: pwsh
run: twine upload dist/*
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 7431b66

Please sign in to comment.