mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
version: 2.1
|
|
|
|
orbs:
|
|
# The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files
|
|
# Orb commands and jobs help you with common scripting around a language/tool
|
|
# so you dont have to copy and paste it everywhere.
|
|
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
|
|
python: circleci/python@1.2
|
|
poetry: frameio/poetry@0.21.0
|
|
swissknife: roopakv/swissknife@0.59.0
|
|
|
|
workflows:
|
|
build-test-publish:
|
|
jobs:
|
|
- test:
|
|
filters:
|
|
tags:
|
|
only: /.*/
|
|
- build-publish:
|
|
requires:
|
|
- test
|
|
filters:
|
|
branches:
|
|
ignore: /.*/
|
|
tags:
|
|
only: /^v.*/
|
|
|
|
jobs:
|
|
test:
|
|
docker:
|
|
- image: cimg/python:3.9
|
|
steps:
|
|
- checkout
|
|
# - run: sed -e '41,45d' -i pyproject.toml
|
|
- poetry/install
|
|
- poetry/shell:
|
|
args: pytest --junitxml=test-results/junit.xml
|
|
- store_test_results:
|
|
path: test-results
|
|
build-publish:
|
|
docker:
|
|
- image: cimg/python:3.9
|
|
steps:
|
|
- checkout
|
|
- run: poetry build
|
|
- store_artifacts:
|
|
path: dist
|
|
- swissknife/publish_github_release:
|
|
tag: ${CIRCLE_TAG}
|
|
- run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD
|
|
|