Skip to content
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
114 changes: 57 additions & 57 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,60 +43,60 @@ jobs:
exit 1
fi

publish-test-pypi:
name: Publish to TestPyPI
runs-on: ubuntu-latest
needs: download-distribution

environment:
name: testpypi
url: https://test.pypi.org/p/python_project_blueprint # Replace with your package name

steps:
- name: Download build artifacts
uses: actions/download-artifact@v7
with:
name: python-package-distributions-${{ github.event.workflow_run.head_sha }}
path: dist/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: dist/
skip-existing: true
verbose: true

github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [download-distribution, publish-test-pypi]

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Download build artifacts
uses: actions/download-artifact@v7
with:
name: python-package-distributions-${{ github.event.workflow_run.head_sha }}
path: dist/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version
id: meta
run: |
VERSION=$(grep '^version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: dist/*
tag_name: v${{ steps.meta.outputs.version }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# publish-test-pypi:
# name: Publish to TestPyPI
# runs-on: ubuntu-latest
# needs: download-distribution
#
# environment:
# name: testpypi
# url: https://test.pypi.org/p/python_project_blueprint # Replace with your package name
#
# steps:
# - name: Download build artifacts
# uses: actions/download-artifact@v7
# with:
# name: python-package-distributions-${{ github.event.workflow_run.head_sha }}
# path: dist/
# run-id: ${{ github.event.workflow_run.id }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Publish to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# packages-dir: dist/
# skip-existing: true
# verbose: true
#
# github-release:
# name: Create GitHub Release
# runs-on: ubuntu-latest
# needs: [download-distribution, publish-test-pypi]
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v6
#
# - name: Download build artifacts
# uses: actions/download-artifact@v7
# with:
# name: python-package-distributions-${{ github.event.workflow_run.head_sha }}
# path: dist/
# run-id: ${{ github.event.workflow_run.id }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Extract version
# id: meta
# run: |
# VERSION=$(grep '^version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
# echo "version=$VERSION" >> $GITHUB_OUTPUT
#
# - name: Create GitHub release
# uses: softprops/action-gh-release@v2
# with:
# files: dist/*
# tag_name: v${{ steps.meta.outputs.version }}
# generate_release_notes: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "python-project-blueprint"
version = "0.0.1"
description = "Production-ready Python project template with modern tooling, CI/CD, security, and configuration built in."
name = "DISTRIBUTION-NAME"
version = "0.1.0"
description = "[[DESCRIPTION]]"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.12"
license = {"file" = "LICENSE.md"}
authors = [
{ name = "Pymetheus", email = "github.senate902@passfwd.com" }
{ name = "[[USERNAME]]", email = "AUTHOR@EXAMPLE.COM" }
]

classifiers = [
Expand All @@ -30,13 +30,13 @@ dev = [
]

[project.urls]
Homepage = "https://github.com/Pymetheus/python-project-blueprint" # "https://github.com/[[USERNAME]]/[[REPO_NAME]]"
Repository = "https://github.com/Pymetheus/python-project-blueprint" # "https://github.com/[[USERNAME]]/[[REPO_NAME]]"
Documentation = "https://github.com/Pymetheus/python-project-blueprint/blob/main/docs/INSTRUCTIONS.md" # "https://github.com/[[USERNAME]]/[[REPO_NAME]]/blob/main/docs/DOCUMENTATION.md"
Issues = "https://github.com/Pymetheus/python-project-blueprint/issues" # "https://github.com/[[USERNAME]]/[[REPO_NAME]]/issues"
Homepage = "https://github.com/[[USERNAME]]/[[REPO_NAME]]"
Repository = "https://github.com/[[USERNAME]]/[[REPO_NAME]]"
Documentation = "https://github.com/[[USERNAME]]/[[REPO_NAME]]/blob/main/docs/DOCUMENTATION.md"
Issues = "https://github.com/[[USERNAME]]/[[REPO_NAME]]/issues"

[project.scripts]
python-project-blueprint = "package_name.main:main"
DISTRIBUTION-NAME = "package_name.main:main"

[build-system]
requires = ["setuptools>=68.0"]
Expand Down
Loading