Pre-release qbraid to PyPi #14
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: Pre-release qbraid to PyPi | |
on: | |
workflow_dispatch: | |
jobs: | |
pypi-publish: | |
name: Build dist & upload to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install build | |
- name: Build binary wheel + source tarball | |
id: build-dev | |
run: | | |
export QBRAID_PRE_RELEASE_VERSION=$(tools/stamp_dev_version.sh) | |
[[ "$QBRAID_PRE_RELEASE_VERSION" =~ .*dev.* ]] && echo "Deploying dev version '$QBRAID_PRE_RELEASE_VERSION'" || (echo "not dev version"; exit 0) | |
out_dir="${PWD}/dist" | |
tools/create_dev_build.sh $QBRAID_PRE_RELEASE_VERSION "${out_dir}" | |
echo "dir=$out_dir" >> $GITHUB_OUTPUT | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: ${{ steps.build-dev.outputs.dir }} |