diff --git a/.github/workflows/publish-pypi-test.yml b/.github/workflows/publish-pypi-test.yml index 8f86c37..061418a 100644 --- a/.github/workflows/publish-pypi-test.yml +++ b/.github/workflows/publish-pypi-test.yml @@ -1,7 +1,7 @@ -# .github/workflows/publish-pypi-test.yaml +# .github/workflows/publish-pypi-test.yml # uses trusted publishing to publish the package to test-pypi as described here: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ -name: Publish to Test PyPI +name: Publish to test PyPI on: push: @@ -36,7 +36,27 @@ jobs: - name: Upload distribution packages 📤 uses: actions/upload-artifact@v4 with: - name: cladetime-package-distribution + name: package-distribution path: dist/ -# TODO: add a job for publishing to test-pypi + publish-to-testpypi: + name: Publish Python distribution to test PyPI + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi-test + url: https://test.pypi.org/p/pyprefab + permissions: + id-token: write # needed for trusted publishing (i.e., OIDC) + + steps: + - name: Download distribution artifacts 📥 + uses: actions/download-artifact@v4 + with: + name: package-distribution + path: dist/ + - name: Publish distribution to test PyPI 🚀 + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/README.md b/README.md index 71fe14c..7bc3dc7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# python_app +# pyprefab A Python template for personal use. The package itself doesn't do much, but I keep it up to date as my Python workflow and tooling preferences evolve. @@ -8,7 +8,7 @@ keep it up to date as my Python workflow and tooling preferences evolve. To install this package via pip: ```bash -pip install git+https://github.com/bsweger/python-app-template.git +pip install git+https://github.com/bsweger/pyprefab.git ``` To run it: @@ -30,7 +30,7 @@ Prerequisites: 2. Change to the repo's root directory: ```bash - cd python-app-template + cd pyprefab ``` 3. Create a Python virtual environment and install dependencies. The command diff --git a/pyproject.toml b/pyproject.toml index 9cd5baf..a1cdc6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = 'python-app' +name = 'pyprefab' description = 'Python application template for personal use' license = {text = 'MIT License'} readme = 'README.md' @@ -27,7 +27,7 @@ dev = [ ] [project.urls] -Repository = "https://github.com/bsweger/python-app-template.git" +Repository = "https://github.com/bsweger/pyprefab.git" [project.entry-points.'console_scripts'] hello_world = 'hello_world.app:main'