Skip to content

Commit

Permalink
Merge pull request #686 from biolink/pypi_publish
Browse files Browse the repository at this point in the history
Pypi publish
  • Loading branch information
sierra-moxon authored Aug 15, 2024
2 parents cb22a25 + e4dd840 commit 1880c2a
Show file tree
Hide file tree
Showing 5 changed files with 2,071 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/make-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.9", "3.10", "3.11" ]
python: [ "3.10", "3.11" ]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Publish Python Package

on:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Poetry
run: |
pipx install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Build source and wheel archives
run: poetry build

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ var/
*.egg
# keep poetry files out of the repo for now, until we decide if we are moving to a .toml file specification
# for requirements in the future.
pyproject.toml
poetry.lock

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
Loading

0 comments on commit 1880c2a

Please sign in to comment.