Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename project and automate test-pypi publishing #13

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/publish-pypi-test.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = 'python-app'
name = 'pyprefab'
description = 'Python application template for personal use'
license = {text = 'MIT License'}
readme = 'README.md'
Expand Down Expand Up @@ -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'
Expand Down
Loading