diff --git a/.github/workflows/wf-push.yml b/.github/workflows/wf-push.yml index 524379a..d593f6a 100644 --- a/.github/workflows/wf-push.yml +++ b/.github/workflows/wf-push.yml @@ -46,7 +46,7 @@ jobs: deploy-docs: name: Deploy documentation 📚 to GitHub Pages - if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/magic-test-deploy') }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} needs: - build runs-on: ubuntu-latest @@ -77,7 +77,7 @@ jobs: - name: Install Tox run: pip install tox - - name: Run lint + - name: Run Doc run: tox -e doc - name: Deploy to GitHub Pages @@ -87,14 +87,17 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/html force_orphan: true - keep_files: true publish-to-testpypi: name: Publish Python 🐍 distribution 📦 to TestPyPI - if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' + if: startsWith(github.ref, 'refs/tags/') needs: - build runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] environment: name: testpypi @@ -106,14 +109,19 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Download dist - uses: actions/download-artifact@v6 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 with: - name: build-artifacts-3.12 - path: . + python-version: ${{ matrix.python-version }} - - name: list all files - run: ls -lR + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install Tox + run: pip install tox + + - name: Run build + run: tox -e build - name: Publish distribution 📦 to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -128,6 +136,10 @@ jobs: needs: - publish-to-testpypi # only publish to PyPI after TestPyPI publishing runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] environment: name: pypi @@ -137,14 +149,21 @@ jobs: id-token: write steps: - - name: Download all the dists - uses: actions/download-artifact@v6 + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 with: - name: build-artifacts-3.12 - path: ./ + python-version: ${{ matrix.python-version }} + + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install Tox + run: pip install tox - - name: list all files - run: ls -lR + - name: Run build + run: tox -e build - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1