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
35 changes: 26 additions & 9 deletions .github/workflows/wf-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -41,15 +41,19 @@ jobs:
with:
name: build-artifacts-${{ matrix.python-version }}
path: |
dist/
dist


deploy-docs:
name: Deploy documentation 📚 to GitHub Pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags' }}
if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/magic-test-deploy') }}
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]

environment:
name: github-pages
Expand All @@ -62,18 +66,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.12
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: 3.12
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install Tox
run: pip install tox

- name: Run Doc
- name: Run lint
run: tox -e doc

- name: Deploy to GitHub Pages
Expand All @@ -83,10 +87,11 @@ 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/') # only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -99,17 +104,22 @@ jobs:
id-token: write

steps:
- name: Download all the dists
- uses: actions/checkout@v3

- name: Download dist
uses: actions/download-artifact@v6
with:
name: build-artifacts-3.12
path: ./
path: .

- name: list all files
run: ls -lR

- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

publish-to-pypi:
name: >-
Expand All @@ -118,18 +128,25 @@ jobs:
needs:
- publish-to-testpypi # only publish to PyPI after TestPyPI publishing
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/nasdaq-protocols

permissions:
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
name: build-artifacts-3.12
path: ./

- name: list all files
run: ls -lR

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true