From 17473ce7150868da6092b6ac3c9eef7ea4c64649 Mon Sep 17 00:00:00 2001 From: Kirk Bonney <47759761+kbonney@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:47:14 -0500 Subject: [PATCH] Publish (#8) * adding publishing workflow for pypi * adding pull request template from pvops --- .github/pull_request_template.md | 31 +++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/publish.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..85d2343 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,31 @@ +## Description +*Thank you for your contribution! Please provide a brief description of the problem and the proposed solution or new feature (if not already fully described in a linked issue)* + +<!--- Describe your changes in detail --> + +## Motivation and Context +<!--- Why is this change required? What problem does it solve? --> +<!--- If it fixes an open issue, please link to the issue here. --> + +## How has this been tested? +<!--- Please describe in detail how you tested your changes. --> +<!--- Include details of your testing environment, tests ran to see how --> +<!--- your change affects other areas of the code, etc. --> + +## Screenshots (if appropriate): + +## Types of changes +<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) + +## Checklist: +<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> +<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. + +<!--- Template Acknowledgements: --> +<!--- Template grabbed from https://github.com/stevemao/github-issue-templates/blob/master/questions-answers/PULL_REQUEST_TEMPLATE.md --> \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..951a50b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Upload to PyPi +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*