Skip to content

Commit 504bd5e

Browse files
committed
action to publish the package to PyPI
1 parent 63445c9 commit 504bd5e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/package.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
python-version: [3.6]
14+
os: [ubuntu-latest]
15+
16+
steps:
17+
- name: Switch branch
18+
uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install Python dependencies
24+
run: |
25+
which python
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
- name: Flit publish
29+
run:
30+
flit publish
31+
env:
32+
FLIT_USERNAME: __token__
33+
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
34+
FLIT_INDEX_URL: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)