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
33 changes: 19 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: 3.13
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -37,23 +37,28 @@ jobs:
uses: fedora-python/tox-github-action@807f27871410c7391018dc9a245c8cffdced15e9 # v41.0
with:
tox_env: ${{ matrix.tox_env }}
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
cache: pip
cache-dependency-path: |
requirements-dev.txt
setup.py
deploy:
name: Build deploy
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- uses: casperdcl/deploy-pypi@928e3123266d588b46c017228f9a9d4c13ad4c93 # v2.5.0
- run: python -m pip install --upgrade build
- run: python -m build
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist
path: dist/
publish:
runs-on: ubuntu-latest
needs: build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include here: needs: [lint, test, build] ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong opinions, might not be a bad idea, but just noting that those dependencies did not exist before this change either -- deploy did not depend on build (which is now renamed to more descriptive test), and nothing had a dependency on lint. publish's dependency on build as introduced here is a hard one now, though.

if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
password: ${{ secrets.PYPI_TOKEN }}
build: true
# only upload if a tag is pushed (otherwise just build & check)
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
Loading