From 78b5dfe7994a4fe8a5d30859677515bc67dc2291 Mon Sep 17 00:00:00 2001 From: Yorai Levi Date: Wed, 30 Oct 2024 09:27:54 +0200 Subject: [PATCH] Added api token in options based on githib discussion https://github.com/pypa/gh-action-pypi-publish/issues/278#issuecomment-2445537820 --- .github/workflows/python-package.yml | 4 ++-- .github/workflows/python-publish.yml | 1 + hatch/README.md | 10 ++++++++-- .../src/hatch_module_yorailevi/__about__.py | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f440cae..921d36a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,9 +5,9 @@ name: Python package on: push: - branches: [ $default-branch ] + branches: [ master ] pull_request: - branches: [ $default-branch ] + branches: [ master ] jobs: build: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 5ded536..e6b17d5 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -43,3 +43,4 @@ jobs: with: packages-dir: ./hatch/hatch-module-yorailevi/dist/ # the action doesn't use cwd but global repo repository-url: https://test.pypi.org/legacy/ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} \ No newline at end of file diff --git a/hatch/README.md b/hatch/README.md index ac2b5fc..d850ee0 100644 --- a/hatch/README.md +++ b/hatch/README.md @@ -22,11 +22,17 @@ Credentials username = __token__ password = pypi-********* ``` - +from pypi/test.pypi ``` pip install hatch-module-yorailevi +pip install -i https://test.pypi.org/simple/ hatch-module-yorailevi ``` +from github url +``` +python -m pip install "git+https://github.com/YoraiLevi/pip_installable_module/#subdirectory=hatch/hatch-module-yorailevi" +``` +Locally, editable ``` pip install -e . -``` \ No newline at end of file +``` diff --git a/hatch/hatch-module-yorailevi/src/hatch_module_yorailevi/__about__.py b/hatch/hatch-module-yorailevi/src/hatch_module_yorailevi/__about__.py index ccec3f7..24c21d3 100644 --- a/hatch/hatch-module-yorailevi/src/hatch_module_yorailevi/__about__.py +++ b/hatch/hatch-module-yorailevi/src/hatch_module_yorailevi/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2024-present Yorai Levi # # SPDX-License-Identifier: MIT -__version__ = "0.0.2" +__version__ = "0.0.4"