File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1010 branches :
1111 - main
1212
13+ permissions :
14+ contents : write
15+
1316jobs :
17+ ruff :
18+ name : Ruff Linting
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Check out repository
22+ uses : actions/checkout@v4
23+ - name : Install UV
24+ uses : astral-sh/setup-uv@v4
25+ - name : Set up Python
26+ run : uv python install
27+ - name : Install the project
28+ run : uv sync --dev
29+ - name : Ruff (linting + formating)
30+ id : ruff
31+ run : |
32+ uv run pre-commit run --all
33+ - name : Generate Badges
34+ if : success() || failure()
35+ run : |
36+ mkdir -p badges/
37+ uv run anybadge --overwrite --label=python --value="$(cat .python-version)" --value-format='%.2f' --file=badges/python.svg --color='dodgerblue'
38+ uv run anybadge --overwrite --value="${{ steps.ruff.outcome }}" --label=ruff --file=badges/ruff.svg success=green failure=red
39+ uv run anybadge --overwrite --label=version --value="v$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)" --file=badges/version.svg --color='green'
40+ - name : Publish badges to GitHub Pages
41+ if : (success() || failure()) && (github.ref_name == github.event.repository.default_branch)
42+ uses : JamesIves/github-pages-deploy-action@v4
43+ with :
44+ folder : badges/
45+ clean : false
46+
1447 pypi-publish :
1548 name : Upload release to PyPI
1649 runs-on : ubuntu-latest
50+ needs : [ ruff ]
1751 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
1852 environment :
1953 name : pypi
You can’t perform that action at this time.
0 commit comments