Skip to content

Commit 6a36e68

Browse files
authored
Merge pull request #268 from Teemu/release-automation
2 parents cd2f206 + 9b93b74 commit 6a36e68

File tree

4 files changed

+82
-2
lines changed

4 files changed

+82
-2
lines changed

.github/workflows/build-and-test.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,34 @@ jobs:
3939
env:
4040
TOXENV: ${{ matrix.toxenv }}
4141
run: tox
42+
43+
deploy:
44+
name: Deploy
45+
environment: Deployment
46+
needs: test
47+
runs-on: ubuntu-22.04
48+
if: github.ref=='refs/heads/main' && github.event_name!='pull_request'
49+
50+
steps:
51+
- uses: actions/checkout@v3
52+
53+
- name: Setup Python
54+
uses: actions/setup-python@v4
55+
with:
56+
python-version: "3.9"
57+
58+
- name: Check release
59+
id: check_release
60+
run: |
61+
python -m pip install poetry githubrelease httpx==0.18.2 autopub twine wheel
62+
echo "release=$(autopub check)" >> $GITHUB_OUTPUT
63+
64+
- name: Publish
65+
if: ${{ steps.check_release.outputs.release=='' }}
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
68+
TWINE_USERNAME: "__token__"
69+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
70+
run: |
71+
git remote set-url origin https://$GITHUB_TOKEN@github.com/${{ github.repository }}
72+
autopub deploy

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
dist/
66
build
77
.coverage
8+
poetry.lock

CHANGES.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Changelog
22
---------
33

4-
A list of changes between each release.
5-
64
0.9.6 (2022-11-5)
75
^^^^^^^^^^^^^^^^^^^
86

pyproject.toml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[tool.poetry]
2+
name = "pytest-sugar"
3+
version = "0.9.6"
4+
description = "Pytest plugin that adds a progress bar and other visual enhancements"
5+
authors = ["Teemu <orkkiolento@gmail.com>", "Janne Vanhala <janne.vanhala@gmail.com>"]
6+
license = "BSD"
7+
readme = "README.md"
8+
keywords = ["testing", "pytest", "plugin"]
9+
10+
repository = "https://github.com/Teemu/pytest-sugar"
11+
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Intended Audience :: Developers",
15+
"License :: OSI Approved :: BSD License",
16+
"Operating System :: POSIX",
17+
"Operating System :: Microsoft :: Windows",
18+
"Operating System :: MacOS :: MacOS X",
19+
"Topic :: Software Development :: Testing",
20+
"Topic :: Software Development :: Libraries",
21+
"Topic :: Utilities",
22+
]
23+
24+
[tool.poetry.urls]
25+
"Tracker" = "https://github.com/Teemu/pytest-sugar/issues"
26+
27+
[tool.poetry.dependencies]
28+
python = ">=3.8.1,<4.0"
29+
pytest = ">=6.2.0"
30+
termcolor = ">=2.1.0"
31+
packaging = ">=21.3"
32+
33+
[tool.poetry.dev-dependencies]
34+
black = "^23.0"
35+
flake8 = "^3.9"
36+
isort = "^5.12"
37+
38+
[tool.autopub]
39+
project-name = "pytest-sugar"
40+
git-username = "botpub"
41+
git-email = "52496925+botpub@users.noreply.github.com"
42+
append-github-contributor = true
43+
changelog-file = "CHANGES.rst"
44+
changelog-header = "---------"
45+
version-header = "^"
46+
version-strings = ["pytest_sugar.py"]
47+
build-system = "setuptools"
48+
49+
[build-system]
50+
requires = ["setuptools >= 40.6.0", "wheel"]

0 commit comments

Comments
 (0)