Skip to content

Commit

Permalink
Set version in workflow dispatch (#2014)
Browse files Browse the repository at this point in the history
* Set version in workflow dispatch

* Add option to not upload to test.pypi.org

---------

Co-authored-by: Agisilaos Kounelis <kounelisagis@gmail.com>
  • Loading branch information
dudoslav and kounelisagis authored Jul 25, 2024
1 parent 773514f commit 8b1d7fd
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ name: Build and test wheels

on:
workflow_dispatch:
inputs:
version:
description: Version to use are release version
required: true
type: string
test_pypi:
description: Upload packages to test.pypi.org
required: false
type: boolean
default: false
push:
branches:
- release-*
- "*wheel*" # must quote since "*" is a YAML reserved character; we want a string
tags:
- "*"
pull_request:
branches:
- "*wheel*" # must quote since "*" is a YAML reserved character; we want a string

env:
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TILEDB: ${{ inputs.version }}

jobs:
build_wheels:
Expand Down Expand Up @@ -137,6 +144,7 @@ jobs:
echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT"
- name: Upload to test-pypi
if: inputs.test_pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
Expand Down

0 comments on commit 8b1d7fd

Please sign in to comment.