Skip to content

Commit

Permalink
Create pypi_publishing.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rowingdude authored Aug 1, 2024
1 parent 31f1c7c commit a47fd14
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/pypi_publishing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Python Package

on:
push:
branches:
- main

jobs:
pypi-publish:

name: Upload release to PyPI
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/<your-pypi-project-name>

permissions:
id-token: write

steps:
- uses: actions/checkout@v3

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.9.0

with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a47fd14

Please sign in to comment.