-
Notifications
You must be signed in to change notification settings - Fork 17
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
2 changed files
with
22 additions
and
8 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 |
---|---|---|
|
@@ -56,14 +56,18 @@ An optional space-separated list of debian packages to be installed before build | |
|
||
An optional space-separated list of poetry plugins to be installed before building the package | ||
|
||
### `package_directory` | ||
|
||
An optional subdirectory path if poetry package doesn't reside in the main workflow directory | ||
|
||
|
||
## Example usage | ||
|
||
The following will build and publish the python package to the PyPI using the last version of python and poetry. Specify the python package version and dependencies in `pyproject.toml` in the root directory of your project. | ||
|
||
```yaml | ||
- name: Build and publish to pypi | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
``` | ||
|
@@ -72,7 +76,7 @@ Python and poetry versions can be specified in inputs as well as the build_forma | |
```yaml | ||
- name: Build and publish to pypi | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
python_version: "3.7.1" | ||
poetry_version: "==1.0.5" # (PIP version specifier syntax) | ||
|
@@ -86,7 +90,7 @@ Repository can be changed to TestPyPI or a private wheels repo by specifying rep | |
```yaml | ||
- name: Build and publish to pypi | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
repository_name: "testpypi" | ||
|
@@ -97,7 +101,7 @@ Repository authentication can be changed to http-basic authentification by speci | |
```yaml | ||
- name: Build and publish to private Python package repository | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
repository_name: "foo" | ||
repository_url: "https://foo.bar/simple/" | ||
|
@@ -109,7 +113,7 @@ Extra debian packages can be installed before building the python package. This | |
```yaml | ||
- name: Build and publish to pypi | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
extra_build_dependency_packages: "capnproto libzmq3-dev" | ||
|
@@ -119,12 +123,22 @@ Poetry plugins can be added by specifying plugins input | |
```yaml | ||
- name: Build and publish to pypi | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
plugins: "poetry-dynamic-versioning-plugin" | ||
``` | ||
Poetry package can be built from a subdirectory. It should be specified as package_directory | ||
```yaml | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
package_directory: "subdirectory" | ||
``` | ||
## Example workflow | ||
The following will build and publish the python package when project is tagged in the `v*.*.*` form. | ||
|
@@ -141,7 +155,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build and publish to pypi | ||
uses: JRubics/poetry-publish@v1.15 | ||
uses: JRubics/poetry-publish@v1.16 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_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