Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
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
29 changes: 17 additions & 12 deletions .github/workflows/main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ jobs:
name: "Upload latest nlohmann-json version to PyPI"
runs-on: ubuntu-latest
permissions:
contents: read
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}

contents: write
id-token: write # Required for Trusted Publishing
steps:
- uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.13"
architecture: x64

- name: Install dependencies
Expand Down Expand Up @@ -67,9 +64,17 @@ jobs:
- name: List assets
run: ls ./wheelhouse/ -al

- name: Upload wheels
if: github.event_name == 'workflow_dispatch'
run: |
pip install twine
echo "Publish to PyPI..."
twine upload --verbose wheelhouse/*
- name: Upload assets to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# To test, use the TestPyPI:
# repository-url: https://test.pypi.org/legacy/
# You must also create an account and project on TestPyPI,
# as well as set the trusted-publisher in the project settings:
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
# To publish to the official PyPI repository, just keep
# repository-url commented out.
packages-dir: wheelhouse
skip-existing: true
print-hash: true
verbose: true
Loading