Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 35 additions & 16 deletions .github/workflows/wf-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down