diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index e8c7c826..a07bda4f 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,21 +1,26 @@ name: deploy -on: push - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +on: + - push + - workflow_dispatch: + inputs: + confirm_publish: + description: 'Type YES to confirm publishing to PyPI' + required: true + type: string jobs: build-n-publish: runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags') + if: | + github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') || + (github.event_name == 'workflow_dispatch' && inputs.confirm_publish == 'YES') steps: - uses: actions/checkout@v2 - - name: Set up Python 3.7 - uses: actions/setup-python@v1 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.10 - name: Build lagent run: | pip install wheel