Skip to content

Commit

Permalink
Merge branch 'main' of github.com:phelps-sg/openai-pygenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
phelps-sg committed Nov 7, 2023
2 parents 732838c + 16da3fd commit 0c2cfa2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 60 deletions.
60 changes: 12 additions & 48 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,16 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

# This workname: Python package
on:
release:
types: [published]

permissions:
contents: read

push:
tags:
- "v*.*.*"
jobs:
pypi-publish:
name: Upload release to PyPI
build:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/openai-pygenerator
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python -m
pip install
build
setuptools_scm
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish package distributions to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
plugins: "poetry-dynamic-versioning[plugin]"

4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.setuptools.package-data]
openai_pygenerator = ["py.typed"]

[tool.setuptools_scm]
write_to = "src/version.py"

[tool.pytest.ini_options]
pythonpath = "src"
[tool.pytest.ini_optons]
pythonpath = ["src"]

[project]
name = "openai-pygenerator"
Expand All @@ -30,14 +24,15 @@ classifiers = [
[project.urls]
"Homepage" = "https://github.com/phelps-sg/openai-pygenerator"
"Bug Tracker" = "https://github.com/phelps-sg/openai-pygenerator/issues"

[tool.poetry]
name = "openai-pygenerator"
version = "0.1.0"
version = "0.0.0"
description = "Simple generator wrapper for OpenAI Python API with retry"
authors = ["Steve Phelps <[email protected]>"]
license = "MIT License"
readme = "README.md"
packages = [{include = "src/openai_pygenerator"}]
packages = [{include="openai_pygenerator", from="src"}]

[tool.poetry.dependencies]
python = "^3.8.1"
Expand Down

0 comments on commit 0c2cfa2

Please sign in to comment.