Skip to content

Commit 99c6b29

Browse files
author
Frank Odom
committed
Automatically publish to PyPI
1 parent 761985e commit 99c6b29

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch: {}
5+
release:
6+
types:
7+
- created
8+
9+
env:
10+
GCP_PROJECT: sense-staging
11+
GCP_REGION: us-central1
12+
GCP_ARTIFACT_REPOSITORY: innovation-pypi
13+
PYTHON_VERSION: 3.9
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ env.PYTHON_VERSION }}
25+
26+
- name: Install Dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build
30+
31+
- name: Build Package
32+
run: python -m build
33+
34+
- name: Publish to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
user: __token__
38+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
test:
1010
name: Test
1111
runs-on: ubuntu-latest
12+
continue-on-error: true
1213

1314
strategy:
1415
matrix:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_version_tag() -> str:
2626
long_description_content_type="text/markdown",
2727
install_requires=[
2828
"numpy",
29-
"torch>=1.7",
29+
"torch>=1.7,<1.10",
3030
],
3131
extras_require={
3232
"test": [

0 commit comments

Comments
 (0)