diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 7541360bf2..5b0627f075 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -29,12 +29,30 @@ on: jobs: + validate_version: + name: Validate version input + runs-on: ubuntu-latest + steps: + - name: Echo version input + run: | + echo "Version input is: ${{ github.event.inputs.version }}" + + - name: Validate version input + if: ${{ github.event.inputs.version != 'main' && !contains(github.event.inputs.version, 'rc') }} + run: | + echo "Error: Invalid version format. You provided: '${{ github.event.inputs.version }}'" + echo "Allowed formats:" + echo " - 'main'" + echo " - version string containing 'rc' (e.g., 0.8.0rc1, 0.8.0rc2)" + exit 1 + build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-22.04, windows-2022, macos-13, macos-14, macos-15 ] + needs: validate_version steps: - uses: actions/checkout@v4