diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8d56c701..b7915229 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -86,3 +86,41 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} + + # deploy development distribution with changes to develop + deploy-dev-dist: + if: github.ref == 'refs/heads/develop' && github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: setup-python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: install-poetry + uses: snok/install-poetry@v1 + with: + version: 1.4.0 + virtualenvs-in-project: false + virtualenvs-path: ~/.virtualenvs + - name: install dependencies + run: poetry install --no-root --with=dev + - name: increment dev version + env: + PYPI_URL: https://pypi.org + run: poetry run python scripts/bump_dev_version.py + - name: build dist + run: poetry build + - name: publish dev distribution to Test PyPI + id: test-pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + skip_existing: true + - name: publish distribution to PyPI + if: steps.test-pypi.outcome == 'success' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00bf62d3..69a3e062 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,43 +149,4 @@ jobs: - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - - # deploy development distribution with changes to develop - deploy-dev-dist: - needs: testing - if: github.ref == 'refs/heads/develop' && github.event_name == 'push' - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v4 - - name: setup-python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: install-poetry - uses: snok/install-poetry@v1 - with: - version: 1.4.0 - virtualenvs-in-project: false - virtualenvs-path: ~/.virtualenvs - - name: install dependencies - run: poetry install --no-root --with=dev - - name: increment dev version - env: - PYPI_URL: https://pypi.org - run: poetry run python scripts/bump_dev_version.py - - name: build dist - run: poetry build - - name: publish dev distribution to Test PyPI - id: test-pypi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true - - name: publish distribution to PyPI - if: steps.test-pypi.outcome == 'success' - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + files: ./coverage.xml \ No newline at end of file