99 # Daily at 3:11
1010 - cron : " 11 3 * * *"
1111
12+ env :
13+ PIP_DISABLE_PIP_VERSION_CHECK : " 1"
14+ PIP_NO_PYTHON_VERSION_WARNING : " 1"
15+
1216jobs :
1317 pre-commit :
1418 runs-on : ubuntu-latest
1519 steps :
1620 - uses : actions/checkout@v3
1721 - uses : actions/setup-python@v4
1822 with :
19- python-version : " 3.11 "
23+ python-version : " 3.x "
2024 - uses : pre-commit/action@v3.0.0
2125
26+ list :
27+ runs-on : ubuntu-latest
28+ outputs :
29+ noxenvs : ${{ steps.noxenvs-matrix.outputs.noxenvs }}
30+ steps :
31+ - uses : actions/checkout@v3
32+ - name : Set up nox
33+ uses : wntrblm/nox@2022.11.21
34+ - id : noxenvs-matrix
35+ run : |
36+ echo >>$GITHUB_OUTPUT noxenvs=$(
37+ nox --list-sessions |
38+ grep '^* ' |
39+ cut -d ' ' -f 2- |
40+ jq --raw-input --slurp 'split("\n") | map(select(. != ""))'
41+ )
42+
2243 ci :
44+ needs : list
2345 runs-on : ${{ matrix.os }}
2446 strategy :
2547 fail-fast : false
2648 matrix :
2749 os : [macos-latest, ubuntu-latest]
50+ noxenv : ${{ fromJson(needs.list.outputs.noxenvs) }}
2851
2952 steps :
3053 - uses : actions/checkout@v3
3154 - name : Install dependencies
3255 run : >
3356 sudo apt-get update &&
3457 sudo apt-get install -y libenchant-2-dev libxml2-dev libxslt-dev
35- if : runner.os == 'Linux'
58+ if : runner.os == 'Linux' && startsWith(matrix.noxenv, 'docs')
3659 - name : Install dependencies
3760 run : brew install enchant
38- if : runner.os == 'macOS'
61+ if : runner.os == 'macOS' && startsWith(matrix.noxenv, 'docs')
3962 - name : Set up Python
4063 uses : actions/setup-python@v4
4164 with :
42- python-version : " 3.11 "
65+ python-version : " 3.x "
4366 - name : Set up nox
4467 uses : wntrblm/nox@2022.11.21
4568 - name : Run nox
46- run : nox
69+ run : nox -s "${{ matrix.noxenv }}"
4770
4871 packaging :
4972 needs : ci
@@ -54,28 +77,20 @@ jobs:
5477 - name : Set up Python
5578 uses : actions/setup-python@v4
5679 with :
57- python-version : " 3.11 "
80+ python-version : " 3.x "
5881 - name : Install dependencies
5982 run : python -m pip install build
6083 - name : Create packages
6184 run : python -m build .
62- - name : Set up nox
63- uses : wntrblm/nox@2022.11.21
64- - uses : actions/upload-artifact@v3
65- with :
66- name : dist
67- path : dist
6885 - name : Publish to PyPI
6986 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
7087 uses : pypa/gh-action-pypi-publish@release/v1
7188 with :
72- user : __token__
7389 password : ${{ secrets.pypi_password }}
7490 - name : Create a Release
7591 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
7692 uses : softprops/action-gh-release@v1
7793 with :
7894 files : |
79- shiv/bowtie
8095 dist/*
8196 generate_release_notes : true
0 commit comments