Skip to content

Commit f906cbc

Browse files
authored
Prepping for release (#1)
1 parent f6af25b commit f906cbc

File tree

4 files changed

+95
-9
lines changed

4 files changed

+95
-9
lines changed

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
name: Release
3+
4+
on:
5+
push:
6+
tags:
7+
- '*.*.*'
8+
9+
jobs:
10+
11+
########################
12+
# RELEASE CREATION JOB #
13+
########################
14+
job_release:
15+
name: Create Release
16+
runs-on: ubuntu-latest
17+
outputs:
18+
upload_url: ${{ steps.create_release.outputs.upload_url }}
19+
tag: ${{ steps.tag.outputs.tag }}
20+
steps:
21+
- name: Get tag
22+
id: tag
23+
run: |
24+
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
25+
- uses: actions/checkout@v2
26+
- name: Create Release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: ${{ steps.tag.outputs.tag }}
33+
release_name: vpype ${{ steps.tag.outputs.tag }}
34+
draft: true
35+
prerelease: false
36+
37+
38+
##################
39+
# UPLOAD TO PYPI #
40+
##################
41+
job_pypi:
42+
name: Upload to PyPI
43+
runs-on: ubuntu-latest
44+
needs: job_release
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Set up Python 3.9
48+
uses: actions/setup-python@v2
49+
with:
50+
python-version: 3.9
51+
- name: Build
52+
id: build
53+
run: |
54+
pip install -r dev-requirements.txt
55+
pip install .
56+
python setup.py sdist bdist_wheel
57+
echo ::set-output name=version::`python -c "import vnoise;print(vnoise.__version__)"`
58+
- name: Upload File Assets
59+
uses: actions/upload-release-asset@v1.0.2
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ needs.job_release.outputs.upload_url }}
64+
asset_path: dist/vnoise-${{ steps.build.outputs.version }}.tar.gz
65+
asset_name: vnoise-${{ steps.build.outputs.version }}.tar.gz
66+
asset_content_type: application/gzip
67+
- name: pypi-publish
68+
uses: pypa/gh-action-pypi-publish@v1.4.1
69+
with:
70+
# repository_url: https://test.pypi.org/legacy/
71+
password: ${{ secrets.PYPI_TOKEN }}
72+
# skip_existing: true
73+
verbose: true

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change log
2+
3+
#### 0.1.0 (2021-02-24)
4+
5+
* Initial release

dev-requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
black
22
isort
33
mypy
4-
pytest
4+
pytest
5+
setuptools
6+
wheel

setup.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
from setuptools import setup
1+
import pathlib
22

3-
with open("README.md") as f:
4-
readme = f.read()
3+
from setuptools import setup
54

6-
with open("LICENSE") as f:
7-
license_file = f.read()
5+
HERE = pathlib.Path(__file__).parent
6+
readme = (HERE / "README.md").read_text()
87

98
setup(
109
name="vnoise",
@@ -13,13 +12,20 @@
1312
long_description=readme,
1413
long_description_content_type="text/markdown",
1514
author="Antoine Beyeler",
16-
email="abeyeler@ab-ware.com",
17-
url="https://github.com/vpype/vnoise",
18-
license=license_file,
15+
author_email="abeyeler@ab-ware.com",
16+
url="https://github.com/plottertools/vnoise",
17+
license="MIT",
1918
packages=["vnoise"],
2019
python_requires=">=3.6",
2120
install_requires=[
2221
"numpy>=1.19",
2322
"setuptools",
2423
],
24+
classifiers=[
25+
"License :: OSI Approved :: MIT License",
26+
"Operating System :: OS Independent",
27+
"Programming Language :: Python :: 3",
28+
"Topic :: Multimedia :: Graphics",
29+
"Typing :: Typed",
30+
],
2531
)

0 commit comments

Comments
 (0)