Skip to content

Commit

Permalink
Merge pull request #17 from e10v/dev
Browse files Browse the repository at this point in the history
Configure package building and publishing
  • Loading branch information
e10v authored May 9, 2023
2 parents b900664 + d4c2aeb commit c7ec99a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and publish python package
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
prerelease: false
enable-pep582: false
cache: true
- name: Install dependencies
run: pdm sync -G complete
- name: Build and publish
run: pdm publish
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ test = "pytest"

[tool.pdm.version]
source = "scm"
write_to = "rico/_version.py"
write_template = "__version__ = \"{}\""


[tool.isort]
Expand Down
2 changes: 2 additions & 0 deletions src/rico/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Rich content to HTML as easy as doc.print(x)."""

from ._version import __version__ # noqa: F401
2 changes: 2 additions & 0 deletions src/rico/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Package version."""
__version__ = None # Placeholder

0 comments on commit c7ec99a

Please sign in to comment.