File tree Expand file tree Collapse file tree 3 files changed +202
-10
lines changed
Expand file tree Collapse file tree 3 files changed +202
-10
lines changed Original file line number Diff line number Diff line change 1+ name : Setup Python
2+ description : Setup Python
3+
4+ inputs :
5+ python-version :
6+ description : Python version
7+ required : false
8+ default : " 3.10"
9+
10+ runs :
11+ using : " composite"
12+ steps :
13+ - uses : pdm-project/setup-pdm@v3
14+ name : Setup PDM
15+ with :
16+ python-version : ${{ inputs.python-version }}
17+ architecture : " x64"
18+ cache : true
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+
14+ - name : Setup Python environment
15+ uses : ./.github/actions/setup-python
16+
17+ - name : Get Version
18+ id : version
19+ run : |
20+ echo "VERSION=$(pdm show --version)" >> $GITHUB_OUTPUT
21+ echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
22+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
23+
24+ - name : Check Version
25+ if : steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
26+ run : exit 1
27+
28+ - name : Build and Publish Package
29+ run : |
30+ pdm build
31+ pdm publish -u __token__ -P ${{ secrets.PYPI_TOKEN }}
32+ gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1- /*
2- ! /nonebot_plugin_manager /
3- __pycache__
4- ! pyproject.toml
5- ! poetry.lock
6- ! README.md
7- ! CHANGELOG.md
8- ! LICENSE
9- ! .gitignore
10- ! /docs /
1+ # nonebot
2+ data
3+ bot.py
4+ .env
5+
6+ .vscode
7+
8+ # Created by https://www.toptal.com/developers/gitignore/api/python
9+ # Edit at https://www.toptal.com/developers/gitignore?templates=python
10+
11+ # ## Python ###
12+ # Byte-compiled / optimized / DLL files
13+ __pycache__ /
14+ * .py [cod ]
15+ * $py.class
16+
17+ # C extensions
18+ * .so
19+
20+ # Distribution / packaging
21+ .Python
22+ build /
23+ develop-eggs /
24+ dist /
25+ downloads /
26+ eggs /
27+ .eggs /
28+ lib /
29+ lib64 /
30+ parts /
31+ sdist /
32+ var /
33+ wheels /
34+ pip-wheel-metadata /
35+ share /python-wheels /
36+ * .egg-info /
37+ .installed.cfg
38+ * .egg
39+ MANIFEST
40+
41+ # PyInstaller
42+ # Usually these files are written by a python script from a template
43+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
44+ * .manifest
45+ * .spec
46+
47+ # Installer logs
48+ pip-log.txt
49+ pip-delete-this-directory.txt
50+
51+ # Unit test / coverage reports
52+ htmlcov /
53+ .tox /
54+ .nox /
55+ .coverage
56+ .coverage. *
57+ .cache
58+ nosetests.xml
59+ coverage.xml
60+ * .cover
61+ * .py,cover
62+ .hypothesis /
63+ .pytest_cache /
64+ pytestdebug.log
65+
66+ # Translations
67+ * .mo
68+ * .pot
69+
70+ # Django stuff:
71+ * .log
72+ local_settings.py
73+ db.sqlite3
74+ db.sqlite3-journal
75+
76+ # Flask stuff:
77+ instance /
78+ .webassets-cache
79+
80+ # Scrapy stuff:
81+ .scrapy
82+
83+ # Sphinx documentation
84+ docs /_build /
85+ doc /_build /
86+
87+ # PyBuilder
88+ target /
89+
90+ # Jupyter Notebook
91+ .ipynb_checkpoints
92+
93+ # IPython
94+ profile_default /
95+ ipython_config.py
96+
97+ # pyenv
98+ .python-version
99+
100+ # pipenv
101+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
102+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
103+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
104+ # install all needed dependencies.
105+ # Pipfile.lock
106+
107+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
108+ .pdm-python
109+ __pypackages__ /
110+
111+ # Celery stuff
112+ celerybeat-schedule
113+ celerybeat.pid
114+
115+ # SageMath parsed files
116+ * .sage.py
117+
118+ # Environments
119+ .env
120+ .venv
121+ env /
122+ venv /
123+ ENV /
124+ env.bak /
125+ venv.bak /
126+
127+ # Spyder project settings
128+ .spyderproject
129+ .spyproject
130+
131+ # Rope project settings
132+ .ropeproject
133+
134+ # mkdocs documentation
135+ /site
136+
137+ # mypy
138+ .mypy_cache /
139+ .dmypy.json
140+ dmypy.json
141+
142+ # Pyre type checker
143+ .pyre /
144+
145+ # pytype static type analyzer
146+ .pytype /
147+
148+ # End of https://www.toptal.com/developers/gitignore/api/python
149+ ! docker /.env
150+ ! docker /bot.py
You can’t perform that action at this time.
0 commit comments