-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from fabiobarkoski/packaging
build and publish package using github actions
- Loading branch information
Showing
3 changed files
with
83 additions
and
2 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,58 @@ | ||
name: Build and publish packages | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/<your-pypi-project-name> | ||
strategy: | ||
matrix: | ||
package: [upcli, uplib] | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- run: pip install build | ||
|
||
- name: build ${{ matrix.package }} | ||
run: | | ||
cd {{ matrix.package }} | ||
python -m build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./${{ matrix.package }}/dist/* | ||
|
||
- name: Publish packages to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
release: | ||
needs: [publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
#pattern: *.whl | ||
merge-multiple: true | ||
path: dist | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: dist/ | ||
|
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,13 +1,33 @@ | ||
[tool.poetry] | ||
name = "up" | ||
version = "0.2.19" | ||
description = "" | ||
description = "Unified and Pluggable CLI" | ||
authors = ["Julio Faerman <[email protected]>"] | ||
maintainers = ["Julio Faerman <[email protected]>"] | ||
readme = "README.md" | ||
license = "MIT" | ||
homepage = "https://github.com/CaravanaCloud/up" | ||
repository = "https://github.com/CaravanaCloud/up" | ||
documentation = "https://github.com/CaravanaCloud/up#documentation" | ||
keywords = ["CLI"] | ||
classifiers = [ | ||
"Intended Audience :: System Administrators", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Utilities" | ||
] | ||
#packages = [ | ||
# { include = "up_cli", from="./up_cli/"} | ||
#] | ||
|
||
[tool.poetry.urls] | ||
"Bug Tracker" = "https://github.com/CaravanaCloud/up/issues" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
uplib = "^0.2.19" | ||
|
@@ -22,4 +42,4 @@ requires = ["poetry-core"] | |
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
up = "up.main:cli_main" | ||
up = "up.main:cli_main" |
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 |
---|---|---|
|
@@ -3,6 +3,9 @@ name = "uplib" | |
version = "0.2.19" | ||
description = "" | ||
authors = ["Julio Faerman <[email protected]>"] | ||
include = [ | ||
"up.yaml" | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
|