Skip to content

Commit 8cd8d02

Browse files
authored
Automatic deploys w/ CalVer (#34)
* Use calver to generate version * Add publish workflow
1 parent 3c56e75 commit 8cd8d02

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: '3.x'
17+
- name: Lint
18+
run: make lint
19+
- name: Test
20+
run: make test
21+
- name: Install build dependencies
22+
run: pip install -U setuptools wheel build calver
23+
- name: Build
24+
run: python -m build .
25+
- name: Publish
26+
uses: pypa/gh-action-pypi-publish@master
27+
with:
28+
password: ${{ secrets.pypi_password }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools", "wheel", "calver"]
33
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
setup(
1313
name='trove-classifiers',
14-
version='2020.05.21',
1514
description="Canonical source for classifiers on PyPI (pypi.org).",
1615
long_description=long_description,
1716
long_description_content_type="text/markdown",
@@ -26,4 +25,6 @@
2625
],
2726
keywords="classifiers",
2827
packages=find_packages(),
28+
use_calver=True,
29+
setup_requires=["calver"],
2930
)

0 commit comments

Comments
 (0)