publish-pypi-release #125
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
name: publish-pypi-release | |
on: | |
workflow_dispatch: | |
inputs: | |
is_test: | |
description: "Use Test Pypi" | |
required: true | |
type: boolean | |
default: true | |
jobs: | |
build-release: | |
name: Build and publish to pypi | |
runs-on: ubuntu-8core | |
timeout-minutes: 10 | |
environment: | |
name: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install uv | |
run: | | |
pip install uv | |
- name: Build dist | |
run: | | |
uv build | |
- name: upload test distribution | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ inputs.is_test }} | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
- name: upload distribution | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ !inputs.is_test }} |