ci: remove environment restriction from pypi release

This commit is contained in:
wood911010 committed 2026-02-27 23:24:55 +08:00
1 parent 0f6e2c475b
commit 90ee0e120c
1 file changed
+37
+37
View File
@@ -0,0 +1,37 @@
name: Publish to PyPI
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
pypi-publish:
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-latest
# MANDATORY: the workflow must have these permissions to authenticate with PyPI via OIDC
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1