diff --git a/.github/workflows/check-publish.yaml b/.github/workflows/check-publish.yaml index 5c00e7c..cc0df74 100644 --- a/.github/workflows/check-publish.yaml +++ b/.github/workflows/check-publish.yaml @@ -12,6 +12,9 @@ on: workflow_dispatch: ~ + release: + types: [created] + jobs: quality: @@ -57,9 +60,9 @@ jobs: working-directory: docs deploy: + needs: checks if: ${{ github.event_name == 'release' }} name: Upload to Pypi - needs: [checks] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -67,11 +70,6 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.8' - - name: Check version - run: | - release=${GITHUB_REF##*/} - version=$(python setup.py --version) - test "$release" == "$version" - name: Install dependencies run: | python -m pip install --upgrade pip @@ -83,21 +81,3 @@ jobs: run: | python setup.py sdist bdist_wheel twine upload dist/* --verbose - - # publish: - # if: ${{ github.event_name == 'release' }} - # name: Publish on Readthedocs - # needs: deploy - # runs-on: ubuntu-latest - # steps: - # - name: Start polytope-docs build - # uses: actions/github-script@v4 - # with: - # github-token: ${{ secrets.ECMWF_REPO_ACCESS }} - # script: |- - # await github.actions.createWorkflowDispatch({ - # owner: 'ecmwf-projects', - # repo: 'polytope-docs', - # workflow_id: 'publish.yaml', - # ref: 'master' - # });