Skip to content

Commit

Permalink
Add steps to build project in publishing workflow
Browse files Browse the repository at this point in the history
Workflow adjustments are drawn from parts of a blog post.

References:
* https://johnfraney.ca/blog/how-to-publish-a-python-package-with-poetry-and-github-actions/

Disclaimer:
Participation by NIST in the creation of the documentation of mentioned
software is not intended to imply a recommendation or endorsement by the
National Institute of Standards and Technology, nor is it intended to
imply that any specific software is necessarily the best available for
the purpose.

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jul 30, 2024
1 parent cd5c856 commit 0c8dc9b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,21 @@ jobs:
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up oldest tested Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install Dependencies
run: |
pip -q install poetry
poetry install
- name: Build Package
run: poetry build

- name: Push to PyPi
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 0c8dc9b

Please sign in to comment.