File tree Expand file tree Collapse file tree 5 files changed +59
-4
lines changed
Expand file tree Collapse file tree 5 files changed +59
-4
lines changed Original file line number Diff line number Diff line change 1818
1919 - name : Install dependencies
2020 run : pdm install
21+ shell : bash
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ permissions :
9+ id-token : write
10+ contents : write
11+
12+ jobs :
13+ release :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v3
18+
19+ - name : Setup Python
20+ uses : ./.github/actions/setup-python
21+
22+ - name : Get version
23+ id : version
24+ run : |
25+ echo "VERSION=$(pdm show --version)" >> $GITHUB_OUTPUT
26+ echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
27+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
28+
29+ - name : Check version
30+ if : steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
31+ run : exit 1
32+
33+ - name : Build package
34+ run : pdm build
35+
36+ - name : Upload dist
37+ uses : actions/upload-artifact@v3
38+ with :
39+ name : dist
40+ path : dist/*
41+
42+ - name : Publish package to PyPI
43+ uses : pypa/gh-action-pypi-publish@release/v1
44+
45+ - name : Publish package to GitHub
46+ run : |
47+ gh release create ${{ steps.version.outputs.TAG_NAME }} dist/* \
48+ -t "🔖 Release ${{ steps.version.outputs.VERSION }}" --generate-notes
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 7171)
7272
7373
74- _binds : dict [type [Model ], AsyncEngine ] = None # type:ignore
75- _engines : dict [str , AsyncEngine ] = None # type: ignore
76- _metadatas : dict [str , MetaData ] = None # type: ignore
77- _session_factory : async_sessionmaker [AsyncSession ] = None # type: ignore
74+ _binds : dict [type [Model ], AsyncEngine ]
75+ _engines : dict [str , AsyncEngine ]
76+ _metadatas : dict [str , MetaData ]
77+ _session_factory : async_sessionmaker [AsyncSession ]
7878
7979
8080@get_driver ().on_startup
Original file line number Diff line number Diff line change 55创建时间: ${ create_date}
66
77"""
8+ from __future__ import annotations
9+
810from collections.abc import Sequence
911
1012from alembic import op
Original file line number Diff line number Diff line change 55创建时间: ${ create_date}
66
77"""
8+ from __future__ import annotations
9+
810from collections.abc import Sequence
911from contextlib import suppress
1012
You can’t perform that action at this time.
0 commit comments