-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |