Skip to content

Commit

Permalink
Add workflow file to automatically publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Microwave-WYB committed Sep 20, 2024
1 parent 64a733a commit 7ecf39d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
push:
branches:
- main
paths:
- pyproject.toml
- .github/workflows/publish.yml
workflow_dispatch:

jobs:
pypi-publish:
name: upload release 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:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install uv
run: pip install uv
- name: Build package
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 7ecf39d

Please sign in to comment.