Skip to content

Commit 50b6d1d

Browse files
committed
Workflow for PyPi publish, fix typo in readme, bump version
1 parent e9ee7ec commit 50b6d1d

4 files changed

Lines changed: 79 additions & 3 deletions

File tree

.github/workflows/pypi_publish.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build, Test and Publish
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
tags:
10+
- "v*"
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
build-n-publish:
15+
# The type of runner that the job will run on
16+
runs-on: windows-2019
17+
18+
env:
19+
CIBW_BUILD: cp37-win_amd64 cp38-win_amd64 cp39-win_amd64
20+
CIBW_ARCHS: AMD64
21+
CIBW_PLATFORM: windows
22+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7"
23+
CIBW_TEST_REQUIRES: pytest
24+
CIBW_TEST_COMMAND: "pytest {project}/tests"
25+
26+
# Steps represent a sequence of tasks that will be executed as part of the job
27+
steps:
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v2
30+
31+
- name: Setup Python
32+
uses: actions/setup-python@v2.2.1
33+
with:
34+
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
35+
python-version: "3.x"
36+
# The target architecture (x86, x64) of the Python interpreter.
37+
architecture: "x64"
38+
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install cibuildwheel
43+
pip install cython twine
44+
45+
- name: Build Wheels
46+
run: python -m cibuildwheel --output-dir wheelhouse
47+
48+
- name: Upload Wheels
49+
uses: actions/upload-artifact@v2
50+
with:
51+
path: ./wheelhouse/*.whl
52+
53+
- name: Build Source Distribution
54+
run: python setup.py sdist
55+
56+
- name: Upload Source Distribution
57+
uses: actions/upload-artifact@v2
58+
with:
59+
path: ./dist/*.zip
60+
61+
upload_pypi:
62+
need: [build-n-publish]
63+
runs-on: windows-2019
64+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
65+
steps:
66+
- uses: actions/download-artifact@v2
67+
with:
68+
name: artifact
69+
path: dist
70+
71+
- uses: pypa/gh-action-pypi-publish@master
72+
with:
73+
user: __token__
74+
password: ${{ secrets.pypi_password }}
75+
76+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ with open(sys.argv[1], 'rb') as fontfile:
5050

5151
text = sys.argv[2]
5252

53-
face = hb.Face(fontdata)
53+
face = dw.Face(fontdata)
5454
font = dw.Font(face)
5555
upm = font.upem
5656
print(upm)

pypi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ with open(sys.argv[1], 'rb') as fontfile:
1919

2020
text = sys.argv[2]
2121

22-
face = hb.Face(fontdata)
22+
face = dw.Face(fontdata)
2323
font = dw.Font(face)
2424
upm = font.upem
2525
print(upm)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
setup(
3737
name="dwriteshapepy",
38-
version= '1.0.1',
38+
version= '1.0.2',
3939
description="Python extension for Windows DirectWrite shaping, modeled after uharfbuzz ",
4040
long_description=long_description,
4141
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)