Upload Python Package #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Upload Python Package | |
on: | |
release: | |
types: [ published ] | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
environment: | |
name: pypi | |
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status: | |
url: https://pypi.org/p/simplyprint-duet3d/ | |
# | |
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string | |
# ALTERNATIVE: exactly, uncomment the following line instead: | |
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: '3.x' | |
- name: Build package | |
run: uv build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |