Skip to content

Commit 53d67d9

Browse files
committed
Prepare for PyPi
1 parent f7371d6 commit 53d67d9

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: PyPI Release
2+
3+
# https://help.github.com/en/actions/reference/events-that-trigger-workflows
4+
on:
5+
# Trigger the workflow on push or pull request,
6+
# but only for the master branch
7+
push:
8+
branches:
9+
- master
10+
release:
11+
types:
12+
- created
13+
14+
# based on https://github.com/pypa/gh-action-pypi-publish
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@master
22+
- name: Set up Python 3.7
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: 3.7
26+
27+
- name: Install dependencies
28+
run: >-
29+
python -m pip install --user --upgrade setuptools wheel
30+
- name: Build
31+
run: >-
32+
python setup.py sdist bdist_wheel
33+
34+
# ---------------- not testing on test.pypi, for now ----------------------
35+
# - name: Publish to Test PyPI
36+
# if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
37+
# uses: pypa/gh-action-pypi-publish@master
38+
# with:
39+
# user: __token__
40+
# password: ${{ secrets.test_pypi_password }}
41+
# repository_url: https://test.pypi.org/legacy/
42+
43+
- name: Publish distribution 📦 to PyPI
44+
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
45+
uses: pypa/gh-action-pypi-publish@master
46+
with:
47+
user: __token__
48+
password: ${{ secrets.pypi_password }}

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools >= 40.6.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

sclblonnx/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Central place for version numbering:
2-
__version__ = "0.0.1"
2+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)