Skip to content

Commit a135990

Browse files
authored
future / add action.yml (#19)
* Create pythonpublish.yml * modify publish.yml and del travis.yml * modify publish.yml and del travis.yml -2.0 * modify publish.yml -name
1 parent 40e0859 commit a135990

File tree

3 files changed

+61
-39
lines changed

3 files changed

+61
-39
lines changed

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Publish to pypi
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Node
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '10'
20+
- name: Install npm Dependencies
21+
run: |
22+
cd frontend
23+
npm install
24+
npm run build
25+
cd ..
26+
- name: Set up Python
27+
uses: actions/setup-python@v1
28+
with:
29+
python-version: '3.6'
30+
- name: Install python dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install setuptools wheel twine
34+
- name: Build and publish
35+
env:
36+
TWINE_USERNAME: __token__
37+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
38+
run: |
39+
python setup.py sdist
40+
twine upload dist/*

.github/workflows/unittest.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Unit Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unittest:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Python
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: '3.6'
15+
- name: Install python dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install -r requirements.txt
19+
pip install .
20+
- name: Unit Test
21+
run: pytest

.travis.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)