Skip to content

Commit

Permalink
Actually, not twine, need to use the action properly
Browse files Browse the repository at this point in the history
  • Loading branch information
WillJRoper authored Feb 12, 2025
1 parent e9c5465 commit 01d37d9
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Python Package
name: Publish Python 🐍 distribution 📦 to PyPI

on:
push:
Expand All @@ -16,24 +16,46 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools-scm
pip install twine
- name: Build source distribution (sdist only)
run: python -m build --sdist

# We publish using the "Trusted Publisher" system on PyPi
- name: Publish to PyPI via OIDC
uses: pypa/[email protected]
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi-deployment
url: https://pypi.org/p/cosmos-synthesizer
permissions:
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
user: __token__
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 01d37d9

Please sign in to comment.