Skip to content

publish-pypi-release #126

publish-pypi-release

publish-pypi-release #126

Workflow file for this run

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 }}