-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Add conventional commits hook and release notes publishing
- Loading branch information
1 parent
9d47ac4
commit a39a7bd
Showing
5 changed files
with
45 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,30 +1,45 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
- "[2-9].[0-9]+.[0-9]+" | ||
- "[2-9].[0-9]+.[0-9]+-pre[0-9]?" | ||
|
||
jobs: | ||
publish: | ||
name: Publish to PyPI | ||
name: Release to GitHub and PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: pip | ||
cache-dependency-path: "**/pyproject.toml" | ||
|
||
- run: pip install hatchling | ||
|
||
- name: Build package | ||
- name: Build Package | ||
run: hatchling build | ||
|
||
- name: Publish distribution package to PyPI | ||
- name: Publish Release Notes | ||
id: release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
./dist/*.whl | ||
./dist/*.tar.gz | ||
prerelease: ${{ contains(github.ref, '-pre') }} | ||
generate_release_notes: ${{ !contains(github.ref, '-pre') }} | ||
|
||
- name: Publish Distribution Package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "ludic" | ||
version = "0.1.3" | ||
dynamic = ["version"] | ||
description = "Lightweight framework for building HTML pages in pure Python." | ||
keywords = ["html", "htmx", "async", "web", "templating"] | ||
authors = [{ name = "Pavel Dedík", email = "[email protected]" }] | ||
|
@@ -39,6 +39,12 @@ test = [ | |
"httpx", | ||
] | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "_version.py" | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
target-version = "py312" | ||
|