From 834e700b6223751b3966d0e191e0e48dcecbbeae Mon Sep 17 00:00:00 2001 From: Andrew Lapp Date: Wed, 21 Feb 2024 10:01:59 -0600 Subject: [PATCH] try conditional publishing & workflow_dispatch --- .github/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb856ee5f..163439514 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,12 @@ on: release: types: - created + workflow_dispatch: + inputs: + release_tag: + description: 'Run Partial Release (Push to Docker Hub, Dont Push to PyPi)' + required: false + default: 'latest' jobs: release-job: @@ -33,6 +39,7 @@ jobs: run: docker system prune --all --force - name: Set up Python + if: ${{ github.event_name == 'workflow_dispatch' }} uses: actions/setup-python@v2 with: python-version: "3.10" @@ -42,9 +49,11 @@ jobs: python -m pip install build python -m build - name: Check that the package version matches the Release name + if: ${{ github.event_name == 'workflow_dispatch' }} run: | grep -Rq "^Version: ${GITHUB_REF:10}$" outlines.egg-info/PKG-INFO - name: Check sdist install and imports + if: ${{ github.event_name == 'workflow_dispatch' }} run: | mkdir -p test-sdist cd test-sdist @@ -52,6 +61,7 @@ jobs: venv-sdist/bin/python -m pip install ../dist/outlines-*.tar.gz venv-sdist/bin/python -c "import outlines" - name: Check wheel install and imports + if: ${{ github.event_name == 'workflow_dispatch' }} run: | mkdir -p test-wheel cd test-wheel @@ -59,6 +69,7 @@ jobs: venv-wheel/bin/python -m pip install ../dist/outlines-*.whl venv-wheel/bin/python -c "import outlines" - name: Publish to PyPi + if: ${{ github.event_name == 'workflow_dispatch' }} uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: __token__