Skip to content

Commit

Permalink
add release workflow (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
quettabit authored Jan 17, 2025
1 parent 75a9fd5 commit 6f4a48f
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release streamstore package
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
workflow_dispatch:
jobs:
pypi_package_release:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
# For PyPI trusted publishing
id-token: write
# For creating github release
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read release version
id: read_version
uses: SebRollen/[email protected]
with:
file: pyproject.toml
field: project.version
- name: Verify tag and project version
if: ${{ steps.read_version.outputs.value != github.ref_name }}
run: |
echo "::error ::Tag doesn't match project version"
exit 1
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.20"
- name: Build package
run: uv build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Read changelog
id: read_changelog
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.read_version.outputs.value }}
- name: Create github release
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.read_version.outputs.value }}
body: ${{ steps.read_changelog.outputs.changes }}

0 comments on commit 6f4a48f

Please sign in to comment.