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
30 changes: 18 additions & 12 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# Builds and uploads the raytracing package to PyPI when a GitHub Release
# is published. See https://docs.github.com/en/actions/publishing-packages/
# publishing-python-packages.

name: Upload Python Package

Expand All @@ -9,23 +10,28 @@ on:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # setuptools_scm needs full history + tags

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.6'
- name: Install dependencies
python-version: '3.11'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
pip install build twine

- name: Build sdist and wheel
run: python -m build

- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
run: twine upload dist/*
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name = "raytracing"
dynamic = ["version"]
description = "Simple optical ray tracing library to validate the design of an optical system."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.6"
requires-python = ">=3.10"
license = { text = "MIT" }

authors = [
Expand All @@ -40,10 +40,6 @@ classifiers = [
"Topic :: Education",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down