Skip to content

Commit

Permalink
Merge pull request #4 from omadson/feature/automate-release
Browse files Browse the repository at this point in the history
[feature] automate PyPi package publishing with GitHub Actions
  • Loading branch information
zealberth authored Oct 24, 2020
2 parents ff10531 + 2fe4954 commit 3865bbf
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish-package-on-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish package

on:
release:
types: [published]

jobs:
build:
name: Publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
pip install poetry poetry-dynamic-versioning
- name: Publish package on pypi
run: |
poetry build
poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

`lssvr` is a Python module implementing the [Least Squares Support Vector Regression][1] using the scikit-learn as base.

## instalation
the `lssvr` package is available in [PyPI](https://pypi.org/project/lssvr/). to install, simply type the following command:
```
pip install lssvr
```
or using [Poetry](python-poetry.org/):
```
poetry add lssvr
```

## basic usage

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ scipy = "^1.5.2"
[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
requires = ["poetry>=0.12", "poetry-dynamic-versioning"]
build-backend = "poetry.masonry.api"

[tool.poetry-dynamic-versioning]
enable = true

0 comments on commit 3865bbf

Please sign in to comment.