Skip to content

Commit

Permalink
use poetry to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
phelps-sg committed Nov 5, 2023
1 parent 439490f commit fe35c4f
Showing 1 changed file with 11 additions and 48 deletions.
59 changes: 11 additions & 48 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,15 @@
# 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 }}

0 comments on commit fe35c4f

Please sign in to comment.