Skip to content

Commit

Permalink
fix: add python release action
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 17, 2024
1 parent c13ccca commit 1e52417
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- '*'
permissions:
contents: write
id-token: write
jobs:
changelog:
name: Generate changelog
Expand Down Expand Up @@ -34,10 +35,29 @@ jobs:
run: gh release create ${{ github.ref_name }} -F ${{ needs.changelog.outputs.release_body }} --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package:
name: Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --all-extras
- name: Publish package
run: |
sed -i -e "s/0.0.0/${GITHUB_REF#refs/*/}/" pyproject.toml
uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish_release:
name: Publish release
runs-on: ubuntu-latest
needs: [create_draft_release, changelog]
needs: [create_draft_release, package]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit 1e52417

Please sign in to comment.