Skip to content

0.0.1.dev0

0.0.1.dev0 #1

Workflow file for this run

name: Pulblish to TestPyPI
on:
release:
types: [prereleased]
workflow_dispatch:
inputs:
version:
description: 'version'
required: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: "Set env"
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
git tag ${{ github.event.inputs.version }}
else
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
fi
- name: echo version
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Publish to TestPyPI
run: |
pdm publish --repository testpypi