Skip to content

Commit

Permalink
Build and publish to Test PyPI
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp committed Dec 10, 2024
1 parent f5135ab commit d18b790
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,26 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: tests/reports/.coverage.lcov

# testpypi-deploy:
# name: Build and publish Python 🐍 distributions 📦 to TestPyPI
# runs-on: ubuntu-latest
# needs: test
# steps:

# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Publish distribution 📦 to Test PyPI
# uses: JRubics/[email protected]
# continue-on-error: true
# with:
# pypi_token: ${{ secrets.TEST_PYPI_PASSWORD }}
# repository_name: 'testpypi'
# repository_url: 'https://test.pypi.org/legacy/'
testpypi-deploy:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-latest
needs: [pre-commit, test]
steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Install Poetry
uses: Gr1N/setup-poetry@v9

- name: Install library and dependencies
run: |
poetry build
# poetry run pip install --upgrade pip setuptools
# poetry install --with test
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
[tool.poetry]
name = "holoscan-cli"
version = "3.0.0"
version = "0.0.0"
description = "mand line interface for packaging and running Holoscan applications."
authors = ["NVIDIA"]
maintainers = ["mocsharp"]
Expand Down Expand Up @@ -57,7 +57,7 @@ classifiers = [

[tool.poetry.build]
script = "build.py"
generate-setup-file = true
generate-setup-file = false

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
Expand Down Expand Up @@ -110,6 +110,12 @@ addopts = """
--ignore=docs/
"""

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}+{{ branch_escaped }}.{{ commit }}{% endif %}"

[build-system]
requires = ["poetry-core", "setuptools"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core", "setuptools", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"

0 comments on commit d18b790

Please sign in to comment.